help-octave
[Top][All Lists]
Advanced

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

Re: splitting 1 large row into multiple rows


From: Rick T
Subject: Re: splitting 1 large row into multiple rows
Date: Mon, 24 Oct 2011 13:31:42 -1000

Thanks for the quick response but that creates 
540 0 6.26573
6.28319 538.3 0

instead of (which I'm trying to get)
540 6.28319 0 
538.3 6.26573 0


I did try 
tmp = [540 6.28319 0 538.3 6.26573 0];
a = reshape(tmp, [], 3); 
to get the other columns but it's just not giving me what I want which is 

540 6.28319 0 
538.3 6.26573 0

On Mon, Oct 24, 2011 at 1:05 PM, Ron Crummett <address@hidden> wrote:
Try reshape.
 
tmp = [540 6.28319 0 538.3 6.26573 0];
a = reshape(tmp, 2, 3);

-Ron



On Mon, Oct 24, 2011 at 3:54 PM, Rick T <address@hidden> wrote:

I have 1 large row with hundreds of columns in an array in octave

example of a row:  
540 6.28319 0 538.3 6.26573 0

I would like it to look like this. Every 3rd column move data to next row.

540 6.28319 0 
538.3 6.26573 0

How can I go about doing this? 

Thanks


--


_______________________________________________
Help-octave mailing list
address@hidden
https://mailman.cae.wisc.edu/listinfo/help-octave





--


reply via email to

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