I am a little confused when I use the following sentence in c-script:
d=(int)sqrt((InputSignal(0,0))^2+(InputSignal(1,0))^2);
the error message is as follows:
line 2: error: invalid operands to binary expression (‘double’ and ‘double’)
I have included math.h and stdio.h in the declaration page, so what’s wrong?
Were you able to resolve this?
Is “d” an output or declared as an int? All outputs are of type double by default.
Furthermore, it’s not clear to me why you would cast the result to an integer, since the result will most often be a non-integer.
Hannes
3
Did you try replacing InputSignal with a constant double/int to see if that’s the Problem?