hi just a simple question here, so i got this code:
X=linspace(1,10,10);
Y=linspace(1,10,10);
[xx,yy]=meshgrid(X,Y);
as a result x and y 10 by 10 matrix. how should i do if i want to convert xx and yy to 100 by 1 matrix,so for example second row of xx occupied 1st row 11th to 20th column of xx, 3rd row occupied 1st row 21th to 30 th column, etc
thanks for the help! appreciate much!

 채택된 답변

bym
bym 2011년 4월 17일

0 개 추천

doc reshape()

추가 답변 (1개)

Matt Tearle
Matt Tearle 2011년 4월 17일

0 개 추천

xcol = xx(:);
Although, if you want to go by rows, transpose xx first.

카테고리

도움말 센터File Exchange에서 Data Types에 대해 자세히 알아보기

질문:

2011년 4월 17일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by