just started matlab just wondering how to set up a 'for' loop
1 view (last 30 days)
Show older comments

6 Comments
Answers (1)
James Tursa
on 22 Nov 2021
Here is an outline to get you started:
x = _____;
nmax = _____;
result = 0;
for n=1:nmax
result = result + _____;
end
You need to fill in the blanks. The x value and the maximum n value to use. For the blank inside the for-loop, you need to write an expression involving x and n that matches the terms in your sum formula.
0 Comments
See Also
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!