LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Re: XYZ coordinates to matrices?

Hello.

Pls, I want to plot contour maps from XYZ data that is already saved in Microsoft Excel as delimited spreadsheet VI.csv file. How do I apply the solution given below by Altenbach  Knight of NI?

0 Kudos
Message 1 of 5
(2,470 Views)

Hey EngrSadiq, I would suggest making a new forum post and referencing this one with a link. This forum post is from 2013, so you're more likely to get responses if you create a new one!

Francine P.
Applications Engineering
National Instruments
0 Kudos
Message 2 of 5
(2,441 Views)

There is no solution below, but maybe there was one above earlier, before the post got moved to a new thread.

 

How is the data arranged in the csv file?

What's is the size of the xy area?

0 Kudos
Message 3 of 5
(2,433 Views)

Hello sir.

Sorry, I was supposed to write earlier solution not solution below.

The data is separeted by comma, for all X and Y values. I have 3 rows and 169 columns. X ranges from -6 to 6 and Y also have the same range of -6 to 6. Attached is the copy of the whole data  in Microsoft Excel as delimited spreadsheet VI.csv file. Thank you for your attention.

0 Kudos
Message 4 of 5
(2,401 Views)

"Read from spreadsheet file" (or "read delimited spreadsheet" in newer LabVIEW version) will read your data into a 2D array. Use comma as delimiter.

 

Now you need to initialize a 2D array and replace elements with z data according to the xy indices.

2D arrays (or matrices) only have non-negative indices, so you need to offset the x and y to satisfy that constraint.

 

See how far you get. Let us know if you have more problems.

0 Kudos
Message 5 of 5
(2,391 Views)