LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

2d interpolation

Thank you for your advise.

   I saved the data using "write to spreadsheet file", then i read them using"read from spreadsheet file".  Would  the file extension problem also exist?

0 Kudos
Message 11 of 18
(1,002 Views)

That combination should read and write as a text file. Given your data sizes, it should not take very long. What is the size of the file? Have you tried opening it in a text editor (e.g. Notepad) to see if it is what you expect?

 

Note that on Windows, the file extension is actually just an indicator of what is in the file, and is not always correct. You can rename of file to anything, but it does not change the contents. However, it can change the way programs try to interact with it. This is a legacy issue that dates from the MS-DOS days. Make sure your file extensions are ".txt" to ensure proper behavior going through other programs than LabVIEW.

Message 12 of 18
(980 Views)

Thank you for your sincere help.

           the size of my file is about 8KB, and it's a  txt file, The picture is just tha file that I opened using the Notepad. It's the12*96 array  that I want.

0 Kudos
Message 13 of 18
(972 Views)

Sorry for the late reply. I was out of the office on Friday.

 

Your text file looks OK. If you are still having problems, please post the relevant code (not a picture) so we can take a look.

Message 14 of 18
(937 Views)

Hi, 

It‘s Ok, I am very greatful for your reply.

Here I post the interpolation Vi and the files I uesd to test.  It's a simple program .  you can try to test it. Thank you vert much.

 

Carrot

0 Kudos
Message 15 of 18
(917 Views)

On my machine, reading the data takes under a second. The analysis and display takes about 12 seconds. If you want to speed this up, you will need to optimize the analysis. Your disk I/O is good.

Message 16 of 18
(899 Views)

Hi,

     the program  used the random number to generate the  2D array.  That vi just takes less than 2 second. Why are the analysis and display time of these two vi  so different?   You said that I need to optimize the analysis. Do you mean that I need to change the interpolation algorithm or the structure or something else?

    I want ask you another question. As you has tested the vi I posted. You may find that  the displayed graph after interpolation are very strange.  Some regions which  are all -1 become colorful  arfter interpolation. Do you know why??

    Thank you very much.

0 Kudos
Message 17 of 18
(882 Views)

I do not know why GerdW's times with random data and my times with your data are so different. My guess is that the algorithm uses an iterative procedure and your data takes longer to converge than random data. However, I don't know. I did look at the other interpolation schemes. If you switch from bicubic spline to bicubic, the analysis time drops an order of magnitude (~12s to ~1s on my machine).

 

The bicubic spline is known for producing over and undershoots in interpolation. This causes the data to have wider bounds which go outside the custom color range you have set for your Z-axis. The interpolation itself is expected to smooth edges, so you will get more colors, but the bicubic spline increases this effect due to over and under shoots at edges, producing structure that does not really exist. You may want to go to a simple bilinear interpolation, depending upon why you are doing it in the first place.

0 Kudos
Message 18 of 18
(860 Views)