Filter löschen
Filter löschen

Doesn't appear all the title in the Gui

1 Ansicht (letzte 30 Tage)
Fabio Retorta
Fabio Retorta am 11 Aug. 2016
Kommentiert: Image Analyst am 12 Aug. 2016
Hello guys, The title just appear Energetic Po... What I can do to appear Energetic Power Criteria in the title of the GUI I dont know how to solve this problem.
This is the code
Msg = { 'Relative weights of LCOE criteria' 'Relative weights of regulatory criteria' 'Relative weights of technology criteria' };
Title = 'Energetic Power Criterium ';
NumLines = 1;
PrefVal = {'3' '1/4' '5'};
options.Resize='off';% configuração da interface
options.WindowStyle='modal';%configuração da interface
options.Interpreter='tex';%configuração da interface
Data = inputdlg(Msg,Title,NumLines,PrefVal, options);%Interface usuário (MUITO IMPORTANTE)
a_34 = str2num(Data{1});% Número de identificação da propriedade
a_35 = str2num(Data{2});
a_36 = str2num(Data{3});

Akzeptierte Antwort

Image Analyst
Image Analyst am 12 Aug. 2016
  2 Kommentare
Fabio Retorta
Fabio Retorta am 12 Aug. 2016
Bearbeitet: Image Analyst am 12 Aug. 2016
I do understand your code, but I still have some problem.
I will be thankful if you can help me.
First, the pre-defined values (numbers) do not show in the GUI.
Second, when i put the numbers in the lines of GUI, it do not save these numbers on the variables.
N = 22;
prompt = {'Peso em relação ao critério Potencial Energético' 'Peso em relação ao LCOE'...
'Peso em relação ao critério Regulatória' 'Peso em relação ao critério Tecnologia' };
title_text = 'Critério Indice Impacto Socio Ambiental';
num_lines = 1;
def = {'8' '1/9' '2' '1/2'};
caUserResponse = inputdlg(prompt,title_text, [1, length(title_text)+N]);
options.Resize='on';
options.WindowStyle='modal';
options.Interpreter='tex';
a_23 = str2num(def{1});
a_24 = str2num(def{2});
a_25 = str2num(def{3});
a_26 = str2num(def{4});
Image Analyst
Image Analyst am 12 Aug. 2016
You forgot to pass def into inputdlg as the fourth argument. Here is the fixed code:
N = 22;
prompt = {'Peso em relação ao critério Potencial Energético' 'Peso em relação ao LCOE'...
'Peso em relação ao critério Regulatória' 'Peso em relação ao critério Tecnologia' };
title_text = 'Critério Indice Impacto Socio Ambiental';
num_lines = 1;
def = {'8' '1/9' '2' '1/2'};
caUserResponse = inputdlg(prompt, title_text, [1, length(title_text)+N], def);
options.Resize='on';
options.WindowStyle='modal';
options.Interpreter='tex';
a_23 = str2num(def{1});
a_24 = str2num(def{2});
a_25 = str2num(def{3});
a_26 = str2num(def{4});

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Performance and Memory 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!

Translated by