MATLAB Answers

Conversion Wolfram Mathematica to Matlab (Do loop)

2 views (last 30 days)
Juan Angel
Juan Angel on 23 Aug 2021
Commented: Juan Angel on 24 Aug 2021
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 Comments

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!