I just went into the casper_library directory and ran "git grep -l 
complex_addsub".  I now realize that maybe the block is used by a block in a 
.slx format file which that command will not find.  So maybe it is used.  To be 
sure, one would have to use some form of the "find_system" command at the 
matlab prompt.

Dave

> On Oct 3, 2016, at 16:10, Franco Curotto <francocuro...@gmail.com> wrote:
> 
> Thanks! That's a relief, for a moment there I doubted my high school math 
> knowledge. Just out of curiosity, how do you check if a block is used by 
> another block in the library?
> 
> Franco  
> 
> On 10/03/2016 06:14 PM, David MacMahon wrote:
>> Hi, Franco,
>> 
>> I can understand your confusion!  This block is very unusual.  In all 
>> fairness, that bock does what it says it will do, but it is unclear what 
>> it’s intended purpose is.  I think it really computes "a+(b*)" and 
>> "-i(a-(b*))".
>> 
>> It does not appear to be used by any other blocks in the CASPER library.  I 
>> think this block should be removed from the library (or modified to match 
>> the expectations from its name) unless anyone can justify its continued 
>> existence in its current state.
>> 
>> Hope this helps,
>> Dave
>> 
>>> On Oct 3, 2016, at 10:44, Franco <francocuro...@gmail.com 
>>> <mailto:francocuro...@gmail.com>> wrote:
>>> 
>>> Hi
>>> 
>>> Well I feel a little bit stupid asking this, but from the addsub block:
>>> 
>>> 
>>> Adds and subtracts the complex inputs. 
>>> If a = w + ix, b = y + iz then 
>>> a+b = (w+y)/2 + i(x-z)/2 and 
>>> a-b = (x+z)/2 + i(y-w)/2
>>> 
>>> Why it does it like this? Shouldn't it be simply:
>>> 
>>> a+b = w+y + i(x+z)
>>> 
>>> a-b = w-y + i(x-z)
>>> 
>>> I could understand the division by two as a way to avoid overflow, but not 
>>> the rest of the changes.
>>> 
>>> Franco
>>> 
>> 
> 

Reply via email to