用matlab编程,求1到100的和!

来源:学生作业学帮网 编辑:学帮网 时间:2024/05/16 16:36:22

用matlab编程,求1到100的和!

>>sum=0;
>>for i=1:100
sum+=i;
end
>>sum