help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

create a while loop to store arrays


From: shay
Subject: create a while loop to store arrays
Date: Fri, 29 Apr 2011 22:27:30 -0700 (PDT)

hey guys,
I have a 'for' loop that creates three arrays and concatenates them into a
single array 

I need to make a 'while' loop within the 'for' loop to create a user defined
number of these concatenated arrays and store them all on separate lines
within another array. 

ie.   numberofarrays = input('number of arrays = ')
      
      a = 'stringa'
      b = 'stringb'
      c = 'stringc'

      d = [a,b,c]
      %repeat
      a1 = 'stringa1'
      ....

      e = [a1,b1,c1]
 
     all_arrays = [d;e;f;g...;numberofarrays]

Sorry if its a bit vague, please ask for any clarification if necessary. 
Thanks, 
Shay --
View this message in context: 
http://octave.1599824.n4.nabble.com/create-a-while-loop-to-store-arrays-tp3485402p3485402.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]