LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

calculate percent error of array with a reference number

Solved!
Go to solution

Untitled.png

 

 

hello,

i am able to do the percent error of the collumn 0, array..

how would i write the code for column 1, 2, along with column n???

 

0 Kudos
Message 1 of 9
(3,977 Views)

Use another For Loop and use auto-indexing.

 

You may need to transpose your array first depending on whether auto-indexing picks out rows first or columns first.

Message 2 of 9
(3,954 Views)

Untitled.png

 

i think i almost got it?

i just need to figure out the percent error array and arrange it right. 

thank you!

 

0 Kudos
Message 3 of 9
(3,938 Views)
Solution
Accepted by topic author super_saiyans

You really need to learn about arrays and scalars. You use 1D arrays as scalars and 2D arrays as 1D arrays. Two transpose operations in a row is a NOP, why do it?

Don't have the same code in all cases of a case structure. Everything that is the same belongs outside. Only a single number differs between the cases and that's the only thing that belongs inside it See image).

 

 

 

 

Don't bury terminals inside loops and other structures. They belong on the toplevel diagram background.

 

Here's a quick draft.

Download All
Message 4 of 9
(3,934 Views)

what i dont understand is..

and still dont understand is what why is it that when i dont wire to N...

I GET AN ERROR..

but every single example i have seen..its not wired?

 

0 Kudos
Message 5 of 9
(3,927 Views)

You don't get an error if you are autoindexing. It will iterate until it runs out of elements.

Message 6 of 9
(3,923 Views)

can you explain what is autoindexing?

how do i set it to autoindexing?

0 Kudos
Message 7 of 9
(3,903 Views)

Autoindexing is the default for FOR loop tunnels and your tunnels were not set to autoindexing.

This means you must have already changed them. To enable autoindexing, simply change them back (right-click...).

If you don't remember what you did, try some tutorials first.

0 Kudos
Message 8 of 9
(3,886 Views)

ok. i think i got it. thanks

 

0 Kudos
Message 9 of 9
(3,846 Views)