Write MATLAB scripts to calculate the sum of the following series. You need to use for and while loops to solve this problem. No use of MATLAB built-in functions is allowed. Use two forms of the while loop: while(condition), and while(1) or infinite loop.
a) 6 + 11 + 16 + ... + 1291
b) 7 + 14 + 28 + 56. 20 Terms
c) 1 + 3 + 13 + 63 + 313 + .... 20 Terms
Hint: tn+1 = 5tn - 2
Note: The two variants of the while loop are:
(a) while <expression>
<statements>
end
(b) while (1)
<statements>
end