Conversion Wolfram Mathematica to Matlab (Do loop)
1 次查看(过去 30 天)
显示 更早的评论
Hello!. I'd like to ask for your help please. This is just a question from an extremely simple Mathematica code, and I just want to know how I could convert it to the Matlab language:
Clear[sum, n]
sum = 0;
Do[sum = sum + n, {n, 1, 100}]
Print[sum]
Thank you very much!
2 个评论
John D'Errico
2021-8-23
It seems like you are asking pretty basic stuff. And that says you need to read the manual. Try the MATLAB onramp tutorials.
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Loops and Conditional Statements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!