getting the data from the inputdlg box
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Max
am 25 Feb. 2012
Bearbeitet: Matt J
am 25 Okt. 2013
I have the following codes ..where i have given two variables
- distance of sensor from system
- Set point in mm
prompt={'Enter the distance of sensor from system',...
'Enter the set point in mm:'};
name='Input of control system';
numlines=1;
defaultanswer={'45','125'};
answer=inputdlg(prompt,name,numlines,defaultanswer);
Now when i use these codes value of both the variables are stored in the variable answer..
when in workspace i type following things happen
>> answer
'45'
'125'
here its a cell ..but i want to use it as an input by user without cell..
suggest a way to perform this
0 Kommentare
Akzeptierte Antwort
Walter Roberson
am 25 Feb. 2012
There is no way to do that in MATLAB without creating a temporary variable (such as "answer") to hold the values. Once the temporary variable is created, you can use (for example)
[sensdist, setpoint] = answer{:};
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Logical finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!