Info

此问题已关闭。 请重新打开它进行编辑或回答。

how to loop ?

1 次查看(过去 30 天)
Nx mathlab
Nx mathlab 2022-2-4
关闭: Stephen23 2022-2-4
  1 个评论
Image Analyst
Image Analyst 2022-2-4
Are you asking us to do your homework for you?
Did you even try a for loop like it said to use? If not, why not?
theSum = 0;
for x = 0 : 20
% code
end

回答(1 个)

KSSV
KSSV 2022-2-4
% Demo example
thesum = 0 ;
for i = 1:10
thesum = thesum + i ;
end

此问题已关闭。

标签

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by