필터 지우기
필터 지우기

how to store data in a matrix

조회 수: 13 (최근 30일)
nazila
nazila 2012년 9월 17일
답변: mordant eagle 2017년 4월 16일
Hi guys,
I have problem with storing data or points in a 'for loop' . when i am using 'for loop' at end i can display each point one by one but i cant collect them in a matrix, how can i store all points in a matrix? what is your idea? i appreciate any help!
Thanks.

채택된 답변

Thomas
Thomas 2012년 9월 17일
This video should help:
Eg
for ii = 1:50
for jj = 1:10
out(ii,jj)=rand(1);
end
end
out will be a matrix of 50*10
  댓글 수: 1
nazila
nazila 2012년 9월 18일
thanx alot :) it was helpful.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

mordant eagle
mordant eagle 2017년 4월 16일
Hi, what if I want to insert the rows like 1,2,3,...,50 and columns like 1,2,..,10. What shall I do ? for ii = 1:50 for jj = 1:10 out(ii,jj)=???; end
end

카테고리

Help CenterFile Exchange에서 Matrix Indexing에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by