Unsure how to make Y, over range x, output in matrix not a singular answer.
h=.1;
y=1;
for x=0:h:10
Y=y+h.*x;
end

답변 (1개)

David Hill
David Hill 2022년 1월 25일

0 개 추천

No for-loop needed.
h=.1;
y=1;
x=0:h:10;
Y=y+h*x;

카테고리

도움말 센터File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

태그

질문:

2022년 1월 25일

답변:

2022년 1월 25일

Community Treasure Hunt

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

Start Hunting!

Translated by