Home /
Expert Answers /
Computer Science /
matlab-section-1b-triangular-numbers-plot-why-compute-just-one-triangular-number-when-you-can-make-pa931
(Solved): MATLAB Section 1b: Triangular numbers plot Why compute just one triangular number, when you can make ...
MATLAB
Section 1b: Triangular numbers plot Why compute just one triangular number, when you can make a plot that shows a whole sequence? Write a script that produces the plot on the right through the following sections: 1. Title section. 2. Define parameters. The only one here is N (the final sequence number). Set N=30 3. Compute triangular numbers a. Pre-allocate vector to hold the results (e.g. the y-axis) b. Use a for loop to iterate through each sequence number from 1 through N. In the for loop, call your function from 1 a to do the computation 4. Make plot a. Use triangle markers (how appropriate!) b. Label appropriately Publish the script to a pdf, with N=30