Why my prompt (inputdlg) doesn´t work right?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Veronika
am 18 Apr. 2017
Bearbeitet: Stephen23
am 18 Apr. 2017
Dear all,
I have this part of code for option some parameteres in 3D model:
prompt = {'Nastavení výšky modelu:','Nastavení jemnosti sítě modelu:','Nastavení počtu elektrod:','Nastavení vzdálenosti mezi elektrodami:','Nastavení poloměru elektrod:','Nastavení tvaru elektrod:','Nastavení jemnosti sítě elektrod:','Nastavení kontur:'};
dlg_title = 'Nastavení parametrů modelu';
defaultans = {'1','0.8','16','1','0.05','0','0.4','256'};
num_lines = [ones(size(defaultans')) ones(size(defaultans'))*75];
answer = inputdlg(prompt, dlg_title,num_lines, defaultans);
answer = str2double(answer);
params.Height = answer{1};
params.Norm = answer{2};
params.Refi = answer{3};
params.NumEl = answer{4};
params.DistEl = answer{5};
params.RadEl = answer{6};
params.ShapeEl = answer{7};
params.RefiEl = answer{8};
params.Norm = answer{9};
But if I would like to change the number, this error appears:
Cell contents reference from a non-cell array object.
Error in DP_segment_final>Okoli_Callback (line 420)
params.Height = answer{1};
Error in gui_mainfcn (line 95)
feval(varargin{:});
Error in DP_segment_final (line 44)
gui_mainfcn(gui_State, varargin{:});
Error in
matlab.graphics.internal.figfile.FigFile/read>@(hObject,eventdata)DP_segment_final('Okoli_Callback',hObject,eventdata,guidata(hObject))
Error while evaluating UIControl Callback
Can you advice me, what´s wrong?
Thank you for your answers.
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Whos 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!