How do I create a function where the user chooses input and output units?

I need to create a function in which the user is prompted to choose whether they would like to input a value in 'in' or 'cm' or 'm' let's say. But I also need them to be able to choose whether they want the output in 'in' or 'cm' or 'm'.
And this is all for a function calculating the volume of a Sphere. How would one go about doing this code wise?

답변 (0개)

카테고리

도움말 센터File Exchange에서 Aerospace Blockset에 대해 자세히 알아보기

태그

질문:

2013년 5월 6일

Community Treasure Hunt

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

Start Hunting!

Translated by