10-26-2006 10:53 AM
The questions I have are (all cases are for real time signal processing)
1) Can we use nested for loop in Mathscript node?
2) Which one of these is feasible: 1) Matlab script node
2) Mathscript node
3) Is there any other way to interface between matlab and
4) Suppose X is 1D array (DBL) in Labview. And Mathscript code is as below:
For i=1:inf,
Y= X-1;
end
Here X is input and Y is output.
Such code does not produce output (Y variable) in real time processing.
Does it wait till the FOR LOOP ends? Is there any solution to such problem?
10-27-2006 01:31 PM
1) Can we use nested for loop in Mathscript node?
1) Yes you can. Remember that loops should be avoided as much as possible in m-scrips. Most of the times you can use vectorization to represent same task.
2) Which one of these is feasible: 1) Matlab script node
2) Mathscript node
2) What exactly is the "Feasable" question? Real time (see below) or nested loops (see above)
3) Is there any other way to interface between matlab and
4) Suppose X is 1D array (DBL) in Labview. And Mathscript code is as below:
For i=1:inf, 4) Is this vector a valid one? inf = Inf which is different from 1/eps.
Y= X-1;
end
Here X is input and Y is output.
Such code does not produce output (Y variable) in real time processing.
Does it wait till the FOR LOOP ends? Is there any solution to such problem? 5) What is this suppose to produce?
Let me know,
yardov
11-02-2006 12:08 PM
Our project is real time signal acquisition and processing. Someone else in my group has done all data acquisition part and some processing part. My project will work well if I add some coding/programming in it. For that I tried using Matlab/mathscript nodes. But it does not work, as my code has many nested for loops.
4) Suppose X is 1D array (DBL) in Labview. And Mathscript code is as below:
For i=1:inf, 4) Is this vector a valid one? inf = Inf which is different from 1/eps.
here Inf means infinite i.e. for real time the control is in users hand, so the infinite loop will break when user gives command.
Y(i)= X(i) -1;
end
Here X is input and Y is output.
Such code does not produce output (Y variable) in real time processing.
Does it wait till the FOR LOOP ends? Is there any solution to such problem? 5) What is this suppose to produce?
It should produce another 1D array Y, but as I mentioned earlier, it waits till the loop ends, but loop will not end till user gives command.
11-02-2006 11:41 PM