LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

using 3 indices in mathscript

As of now Labview Mathscript can handle only 2 indices. for example:

Mathscript can execute the following

for i = 1:10

    for j = 1:10

        B(i,j) = i+j

    end

end

but it can't do the following:

for i = 1:10

    for j = 1:10

        for k = 1:10

            B(i,j,k) = i+j+k

        end

    end

end

Can anyone guide me to achive the latter using 2 indices and a for loop or something.....?

The actual calculation is quite complicated, i just need a way to handle 3 indices as in the example above.

Please help, i have spent a lot of time breaking my head over this thing.

I have also posted an idea here : http://forums.ni.com/t5/LabVIEW-Idea-Exchange/MathScript-should-handle-more-than-2-indices/idi-p/143...

thankyou.

0 Kudos
Message 1 of 3
(2,310 Views)

Hey Ken,

 

This should work for you.

temp.PNG

Andy Chang
National Instruments
Message 2 of 3
(2,302 Views)

Thankyou for the prompt reply.

0 Kudos
Message 3 of 3
(2,275 Views)