09-05-2013 06:05 AM
I'm a begineer in labview. I want to evaluate an equation which has complex numbers through text code.. Any suggestions Please????
where H12 is 1d array of complex number
i square root of -1
k function of frequency
09-05-2013 06:41 AM - edited 09-05-2013 06:41 AM
Just use a For-loop in combination with a 1d-array of complex numbers. The following example shows the usage of a array of complex numbers:
Or is there any other problem?
09-05-2013 06:42 AM
You could try using a script node (http://zone.ni.com/reference/en-XX/help/371361H-01
Or you can implement it in Labview, since there is a Complex data type (actually more than one).
Here's a snippet as a draft/starting point:
09-05-2013 06:45 AM
Would you know how to do this if they weren't complex numbers? If so, then all you have to do is change the numberic representation to a complex data type.
09-05-2013 09:55 AM
I'm a begineer in labview. I want to evaluate an equation which has complex numbers through text code..
Are you saying you don't want to use LabVIEW to evaluate this? In which case I suggest asking on a different forum.
There is no 'f' in the loop, I don't understand what the loop would evaluate, unless k is a constant in which case the loop is redundant.
k function of frequency
If k is a function of frequency you need to say what that function is. For example if you are evaluating 'k' for changing 'f' and applying it to the equation for R. I don't know what the best procedure would be but my first port of call would be nested loops: 'R' for each 'k' for each 'f' ?
In the absence of a function for k this vi would evaluate you formula for k=f, I don't know if this wil help any.
09-05-2013 10:40 PM
Thank you Marco Mauri & Michael for your sugesstions..
I have implemented it by using loop as you said, but it looks little bit messy, and it becomes difficult to debug,
So, script node will be a better choice. since in my program there are many such equations.
I don't have matlab installed in my PC, but i have scilab installed can i use it, If possible i want to know the syntax...
Thanks and Regards,
09-06-2013 02:00 AM
- when the VI looks messy you should clean it up (there even is the automatic cleanup tool...)
- What means "difficult to debug"? A script node / formula node / scilab node is even more difficult to debug...