I need to make a computation that will return the answer with units.
1 view (last 30 days)
Show older comments
I wrote several programs with will make my desired computations successfully. my problem arises when I try to add a line that will allow the user to type in the units (feet for example) used then return that unit squared Ft^2 or square feet.
I have a program with will compute the area of a square successfully .
X=hight
y=base
fprintf (the area is %d \n x*y)
this program will return the area but i need to have units after the number (ft^2) and I need for the user to choose the units.
0 Comments
Answers (1)
the cyclist
on 1 Sep 2014
You are not giving us much detail. Have you tried the input() function? Hm. I don't know, because you haven't told me.
See Also
Categories
Find more on String Parsing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!