EXAMPLE Matlab Help

Series Calculation with a for Loop

Write a script file to compute the sum of the first 15 terms in the series 5k2 – 2k, k =
1.2.3….. ,5.

Solution

Because we know how many times we must evaluate the expression 5k2 – 2k. we can use a for loop. The script file is the following:

Capture

The answer is 5960.

Posted on July 30, 2015 in An Overview of MATLAB, Uncategorized

Share the Story

Back to Top
Share This