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

来源:学生学帮网 编辑:学帮网 时间:2024/06/05 13:52:04

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

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