LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Interpolating 2D array

Solved!
Go to solution
Highlighted

Hello! I`m in process to create a programm including interpolating 2D array. I have some trouble with it. Data source is read from TXT file,after this I need to do interpolate between two adjacent columns in my array wich was automaticly created when file was read. Finally i need to create new file with new interpolated data for other values of voltage to use it in future. 

 

When I use block "Read from file",data source correctly reading only in type 'STRING' whithout losing signs after dimentional point. But interpolated block only use format DBL and when I use DBL format,it shows just first sing in array. 

 

Screenshots of program and file I`ll attach later.

0 Kudos
Message 1 of 49
(636 Views)
Highlighted

@HoloYolo wrote:

Screenshots of program and file I`ll attach later.


OK, we'll wait for that then. 😉

 

(We prefer VIs over screenshots though. We cannot run or debug pictures...)


LabVIEW Champion. It all comes together in GCentral GCentral
What does "Engineering Redefined" mean??
0 Kudos
Message 2 of 49
(626 Views)
Highlighted

Hi Yolo,

 


@HoloYolo wrote:

When I use block "Read from file",data source correctly reading only in type 'STRING' whithout losing signs after dimentional point. … when I use DBL format,it shows just first sing in array. 


Then you also need to read the help for the FileRead functions.

Maybe you should use ReadDelimitedFile instead of "Read from file" with some proper format codes and delimiter char as inputs?

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 3 of 49
(602 Views)
Highlighted

So that`s it. I need to do automatic interpolate between this two files and create new,as I`ve read eralier. 

 

But I cant attach here TXT files to interpolate it :(. It looks like this. Maybe you know,that it is Touchstone file for different currents.

 

I can share TXT files in other source If it possible for you

HoloYolo_1-1587398948038.png

HoloYolo_2-1587398974452.png

 

0 Kudos
Message 4 of 49
(569 Views)
Highlighted

Hi Yolo,

 


@HoloYolo wrote:

But I cant attach here TXT files to interpolate it :(. It looks like this. Maybe you know,that it is Touchstone file for different currents.

I can share TXT files in other source If it possible for you


You can attach TXT files here in the forum. In case of trouble you can also ZIP all files into just one ZIP file!

You also should use filenames with just English chars as "standard" Windows applications often have problems with Unicode filenames…

 

You also should simplify your block diagram:

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 5 of 49
(559 Views)
Highlighted

That`s it. Thank you

0 Kudos
Message 6 of 49
(557 Views)
Highlighted

Hi Yolo,

 

when you are asked to provide a ZIP files, then you should attach a ZIP file. A RAR file apparently is not a ZIP file! (ZIP files can be handled by Windows while you need an additional proprietary application to handle RAR files! Not everybody will or can do this…)

Why are you naming those files as "LVM": they are simple CSV files (using a TAB as delimiter), so yoou should call them TXT or CSV…

 


@HoloYolo wrote:

I need to do automatic interpolate between this two files and create new,as I`ve read eralier.


How do you want to interpolate "between files"?

Best regards,
GerdW

using LV2011SP1 + LV2017 (+LV2020 sometimes) on Win10+cRIO
0 Kudos
Message 7 of 49
(551 Views)
Highlighted

Is there any difference in LabView if i`ll just change expansion of this files?

I need to interpolate between two adjacent coloumns in final array which was created from this 2 files as it shown on block diagramm. So I think to use block 2D interpolate,but I laso have know ideas how to realize this in it,also because of wrong reading Interpolating block of data this files.

0 Kudos
Message 8 of 49
(547 Views)
Highlighted

So,is it possible to do DBL paramater in reading block,without losing signs after delimetr point?

0 Kudos
Message 9 of 49
(543 Views)
Highlighted

so what you have there is a tab separated text file.

Frozen_0-1587410645649.png

Use the the appropriate read file utility to get a 2D array.

Frozen_1-1587410762312.png

 

 

 

 

0 Kudos
Message 10 of 49
(534 Views)