3. (35 pts) Table and Graph. Write a MATLAB program (script or .m file) to create a table showing radius R
and volume V for a sphere as R varies from 0 cm to 50 cm. Also graph volume vs radius. Specifically:
Write a MATLAB program (script or .m file).
Begin with the block of comments as described above. Add other comments throughout the program.
Use a range variable to assign the values of R from 0 to 50 cm in increments of 5 cm.
Use a formula on the vector above to create another vector for the volume of the sphere. Note that a dot
operation will be required.
Combine the transpose of the two vectors to create a new vector (table).
Display the problem number and your name before displaying the table.
Display the table and include a table heading (with units).
No special formatting is required for this problem.
Extra credit: Use fprintf to use 0 digits after the decimal point for the radius and 2 digits after the
decimal point for the volume.
Form a graph of volume vs radius. Add major gridlines. Label the axes. Add a title.
Print the script, the output table, and the graph.
This is my homework instructions and bellow is the code that i have.
disp('HW #6 - Evan Melanson')
disp('Radius R (cm) | Volume V (cm^3)')
fprintf([repmat('\t %.2f \t', 1, size(sTable,2)) '\n'], sTable');