LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Implementing commands

Can anyone advise me on creating these Matlab commands into Labviews other then using matlabscripts. 
 
n=size(pyw,1)
for i=1:n
A=[pyw(i);pzw(i)];
B=[pyw(i);pzw(i)]';
Z=pww(i);
C=[pyy(i) pyz(i);pzy(i) pzz(i)];
X=abs(B*inv(C)*A)/Z
end
 
say pyw pzw pww pzz are 1D arrays. 
Thanks in advance.
 
 
 
0 Kudos
Message 1 of 6
(3,063 Views)

Hi Celynn,

The Array Size function in Array palette is similar to n=size(pyw,1). Also LabVIEW has For loop in the Structures palette that lets you loop around your code. Index Array function in the array palette would let you pick any element(s) from an array. Finally there are some matrix functions available in the Linear Algebra palette (Functions >> Analyze >> Mathematics >> Linear Algebra) that will let you find out the inverse of a matrix.

Hope this helps.

Ankita

 

 

 

0 Kudos
Message 2 of 6
(3,032 Views)

Ankita Thanks for your reply. But how do i avoid using nested for loop to create the 2by2 matrix without stacking up the matrix so i can do an inverse matrix?

0 Kudos
Message 3 of 6
(3,021 Views)
use the initialize array
0 Kudos
Message 4 of 6
(3,007 Views)
Unclebump, do you mind advise further on using the initialize Array.
0 Kudos
Message 5 of 6
(2,987 Views)
0 Kudos
Message 6 of 6
(2,977 Views)