The Math Forum

Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Math Forum » Discussions » Software » comp.soft-sys.matlab

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: want to collect specific row values from an array
Replies: 2   Last Post: Dec 4, 2012 7:04 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Nasser Abbasi

Posts: 6,677
Registered: 2/7/05
Re: want to collect specific row values from an array
Posted: Dec 4, 2012 6:37 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 12/4/2012 5:16 AM, Moon Datta wrote:
> I have two arrays in which one(A) is of 86400x1
> and another(B) is of 3600x1
> B array is created by the value of every 60th row of A.
> e.g.
> B(1,:)=A(60,:)

But you have one column only. Then why not just write



How about:

M = 86400; N=3600;
A = rand(M,1);
B = rand(N,1);

idx = 0:60:M;
idx(1) = 1;
B = A(idx);


Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.