How to write a sentence with some of the input values to conclude the work?

2 views (last 30 days)
I have to find a sphere's radius and volume with multiple given surface areas. I have created a script to do the work but I must format a sentence at the end that is similar to: "The sphere with surface area _ and radius _ has a volume of _. The surface area value was an input value and the radius and volume values were outputs. this would be easier done in a table, but that is not what the instructor wants.

Accepted Answer

Star Strider
Star Strider on 12 Jun 2016
Use the fprintf or sprintf function, whichever works best for you. See the documentation on them for the details.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!