필터 지우기
필터 지우기

How to show results of for end values as a vector.

조회 수: 1 (최근 30일)
esat gulhan
esat gulhan 2020년 8월 23일
답변: Alan Stevens 2020년 8월 23일
Is there any way to represent results of for end as a vector.
for example
for h0=0:1:2
h=h0*2
end
results
ans
h =
0
h =
2
h =
4
But i want that result like a vector
ans
0 2 4
I know it without using for h0=0:1:2;h=h0*2 . But ı need to represent results of for end as a vector in my real code. can you help

채택된 답변

Alan Stevens
Alan Stevens 2020년 8월 23일
h0 = 0:2;
h = h0.*2

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Multidimensional Arrays에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by