LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I how to save an array to a text file?


@freddearaujo wrote:

How can I save a array with 3 or more dimensions? Is it possible?


It is possible.  It is just a question of how do you want the text file to look in the end.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 11 of 25
(5,094 Views)

My objective is save the array in some kind of file so I can read it in another VI as the original array.

0 Kudos
Message 12 of 25
(5,088 Views)

@freddearaujo wrote:

How can I save a array with 3 or more dimensions? Is it possible?


"Array to spreadsheet string" has defined handling of higher dimensional arrays, so just use it and save the resulting string to a plain text file.

To read it back, just read it as a plain string, then use "spreadsheet string to array" to recreate the N-dimensional array.

 

Why does nobody ever read the help?

 

Personally, it makes little sense to do this. I would recommend to store it in a binary file instead. Much more efficient, with the disadvantage that it is not readable by the typical humans. 😄

Message 13 of 25
(5,087 Views)

What typical human could read a multidimensional array anyway?

 

Lynn

0 Kudos
Message 14 of 25
(5,078 Views)

@freddearaujo wrote:

My objective is save the array in some kind of file so I can read it in another VI as the original array.


If you don't care about reading in a text file, the definately just use the Write Binary File function.  It will make this task very simple.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 15 of 25
(5,076 Views)

@johnsold wrote:

What typical human could read a multidimensional array anyway?


A sorted set of printed pages, each containing a 2D table, is a perfectly readable 3D array. 😄 Now make several such sets and place each in a binder and you have a 4D array. 😄

Message 16 of 25
(5,073 Views)

You and I understand that. I asked about a typical human.

 

Lynn

Message 17 of 25
(5,060 Views)

@johnsold wrote:

You and I understand that. I asked about a typical human.


Yeah, because us knights are kind of crazy.  Even still, I would not want to look at a 3D array in a text file.  It is bad enough with multiple pages in Excel.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 18 of 25
(5,057 Views)

@crossrulz wrote:

@johnsold wrote:

You and I understand that. I asked about a typical human.


Yeah, because us knights are kind of crazy.  Even still, I would not want to look at a 3D array in a text file.  It is bad enough with multiple pages in Excel.


Well, you are probably to young to remember entire books with logarithm tables. 😄 (I guess you've never used a slide rule either).

 

Kids these days!

0 Kudos
Message 19 of 25
(5,051 Views)

@altenbach wrote:

Well, you are probably to young to remember entire books with logarithm tables. 😄 (I guess you've never used a slide rule either).

 

Kids these days!


I have actually used a logrithm table.  I think it was in high school physics (or was it 6th grade math?).  But the slide rule is something that has eluded me.  I can recognize one, but have yet to use one.  If my father ever finds his again, I have laid claim to it.

 

But at least I remember LabVIEW before the project!


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 20 of 25
(5,044 Views)