Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

I have a matrix which is [y1 x1 y2 x2 y3 x3.......]. The size variable depends on the input, I wanna extract y(i) and x(i) seperately from this matrix.

Asked by sermet on 18 May 2013

m=[y1,x2,y2,x2,y3,x3,.......] I wanna extract y(i) as y_column=[y1;y2;y3;y4;....] and x_column=[x1;x2;x3;x4;.......]

0 Comments

sermet

Products

No products are associated with this question.

1 Answer

Answer by Iman Ansari on 18 May 2013
Accepted answer
a=1:10
y=a(1:2:end)'
x=a(2:2:end)'

0 Comments

Iman Ansari

Contact us