2. Write a function called fnns that computes the sum 21 — 1 for each of 1001 values of t uniformly spaced from 0 to 4n inclusive. The input argument is a positive scalar integer n, and the output argument is a row vector of 1001 such sums — one sum for each value of t. Test your code with inputs, 1, 2, 10, 100 and 5000. Plot the curves for all these input values in a single figure. Include legend, titles and labels for the axes.

Source link

Leave a Reply

Your email address will not be published. Required fields are marked *