The Student Room Group

MATLAB!!

I need matlab help,

Say I have a vector eg A= [inf 1 3 6.7] , how would I redfine it without the first element inf?
so that I have say B= [1 3 6.7]

Thanks very much in advance! :biggrin:
Original post by m.wellington
I need matlab help,

Say I have a vector eg A= [inf 1 3 6.7] , how would I redfine it without the first element inf?
so that I have say B= [1 3 6.7]

Thanks very much in advance! :biggrin:


Do you mean you want to get rid of the first element of A to create a new vector B?

If so, I'd use:

B=A(2:end);

Hope that helps!! :smile:
Reply 2
Original post by GuitarMilesy
Do you mean you want to get rid of the first element of A to create a new vector B?

If so, I'd use:

B=A(2:end);

Hope that helps!! :smile:


You leg end! yeh thats perfect thanks. rep for you

Quick Reply

Latest

Trending

Trending