MATLAB Answers

To Enter a Value in a Formulate

14 views (last 30 days)
Murat Kocaman
Murat Kocaman on 29 Jun 2018
Answered: jonas on 29 Jun 2018
I have a formulate and use seperate value for each calculation. I would like to enter the value manually.
An example:
formulate = 3*pi*r^2*4*T
Here I want to enter T value manually for each calculation.
Which code example should I use for this ?


jonas on 29 Jun 2018
You mean that you want the script to stop and ask for user input?

Sign in to comment.

Accepted Answer

jonas on 29 Jun 2018
There are some different options. If you want to enter the value in the command window:
T = input('Enter value of T')
or if you want a dialog box:
V = inputdlg('Enter value of T')
T = str2num(V{1})


Sign in to comment.

More Answers (0)


Community Treasure Hunt

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

Start Hunting!