LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Creating a 2 by 20 array

I am trying to create a 2 by 20 array. The first row must be random numbers and the second row must increase by increments of one. (so, 1-20) this code must use a build array node and send that array to an excel spreadsheet file. Please help. 

0 Kudos
Message 1 of 4
(2,471 Views)

What have you started with so far?

 

Where are you stuck?

 

Do you know about For Loops, the Build Array function, and the random number generator?

 

I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
Learn LabVIEW

0 Kudos
Message 2 of 4
(2,444 Views)

Even if you don't know about the things RavensFan mentioned (and you should do this yourself, with the nodes he suggested) you could also search the forums (a few pages back by now probably)...

 

I saw someone else's solution to this very problem just a couple of days ago, and was struck by the strange requirement that the indices be on the second row (which is why I remembered it).

 

I'll also note that whilst you mention an "excel spreadsheet file" hopefully a .csv (comma separated variable, you could also consider tab-separated) file is sufficient.

This is much simpler and can be solved using some combination of things like "Open/Create/Replace File" and "Write Text File" together with "Array to Spreadsheet String", or alternatively "Write Spreadsheet File" (fewer options and harder to modify the behaviour, but much simpler to get started with).


GCentral
0 Kudos
Message 3 of 4
(2,412 Views)

This Forum has a number of Regular Readers who are very good at spotting the "Please Do My Homework For Me" posts (like yours).  Because we like LabVIEW, and want to encourage students to learn and use LabVIEW, and because we've learned, ourselves, that "The only way to learn a Programming Language is to Write Programs using that Language", we almost never "give you the answer".  If you are stuck, we will help, but you need to "show your work" by attaching the VI that you have started to code so that we can see where you are "stuck" and can help you to Learn LabVIEW.

 

Bob Schor

0 Kudos
Message 4 of 4
(2,385 Views)