select selected numeber of rows from an huge array
Show older comments
Hi,
I need to select 365 (366,:) rows from array of [3652500 x 2] and write a matrix [366 x 10000]. Can somebody help me with that. I am new to MATLAB.
Thanks in advance.
5 Comments
Star Strider
on 12 May 2014
Edited: Star Strider
on 12 May 2014
What do you mean by ‘365 (366,:) rows’?
You will have to delete 3.6550e+006 elements from your [3652500x2] matrix to create your [366x10000] matrix. What elements get included? What elements get left out?
Damith
on 12 May 2014
Cedric
on 12 May 2014
3652500 is a multiple of neither 365 nor 366; could you build an example with e.g. a 6x2 input array?
>> (3652500*2)==(366*10000)
ans =
0
>> num2str((3652500*2)/366,'%.5f')
ans =
19959.01639
>>
Don't fit.
doc reshape % but will have to be commensurate sizes
Walter Roberson
on 12 May 2014
Your first dimension is being reduced by a factor of about 10000, but your second dimension is being increased by a factor of 5000 (10000 / 2). Where is the remaining data to go?
Accepted Answer
More Answers (0)
Categories
Find more on Functions in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!