11-05-2014 08:09 AM
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?
11-06-2014 09:11 AM
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.
11-06-2014 09:43 AM
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.
11-10-2014 08:00 AM
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.
11-11-2014 01:37 AM
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
11-11-2014 08:04 AM
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.
11-11-2014 09:31 PM
Hi,
the program GerdW posted before is also the interpolation program. The difference is that vi 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.
11-12-2014 08:23 AM
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.