필터 지우기
필터 지우기

To Enter a Value in a Formulate

조회 수: 2 (최근 30일)
Murat Kocaman
Murat Kocaman 2018년 6월 29일
답변: jonas 2018년 6월 29일
Hello,
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 ?
  댓글 수: 2
jonas
jonas 2018년 6월 29일
You mean that you want the script to stop and ask for user input?
Murat Kocaman
Murat Kocaman 2018년 6월 29일
Yes I think so.

댓글을 달려면 로그인하십시오.

채택된 답변

jonas
jonas 2018년 6월 29일
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})

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by