필터 지우기
필터 지우기

Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

For-loop in Matlab

조회 수: 1 (최근 30일)
Sergey Dukman
Sergey Dukman 2015년 5월 16일
마감: MATLAB Answer Bot 2021년 8월 20일
Hei!
I have the following for-loop:
for c=(1:10)
x=sind(c)
end
disp(x)
How can I get all values of x as a row vector? Matlab gives me values of x separately from each other. I want to combine them all together.
Sergey
  댓글 수: 2
Radmilka
Radmilka 2015년 5월 16일
for c=(1:10)
x(c)=sind(c);
end
disp(x)
Sergey Dukman
Sergey Dukman 2015년 5월 16일
Hei!
Thank you!
best regards, Sergey Dukman

답변 (1개)

Nobel Mondal
Nobel Mondal 2015년 5월 16일
편집: Nobel Mondal 2015년 5월 16일
You don't even need a for loop
c = 1:10;
x = sind(c);

이 질문은 마감되었습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by