Recall user defined variable in another subsequent user input.
显示 更早的评论
body1 = input ('ENTER THE NAME OF THE FIRST CELESTIAL BODY: ','s');
body2 = input ('ENTER THE NAME OF THE SECOND CELESTIAL BODY: ','s');
planrad = input ('ENTER THE DISTANCE BETWEEN THESE TWO BODIES IN (m): ');
massbod1 = input ('ENTER THE MASS OF (body1): ');
massbod2 = input ('ENTER THE NAME OF (body2): ');
I'm asking the user to define the above variables... How can I programm "massbod1" and "massbod2" to automatically insert the user entered text?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Geoscience 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!