Recall user defined variable in another subsequent user input.
Ältere Kommentare anzeigen
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?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Geoscience finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!