How to display the results of the system to the matlab gui that was made?
Ältere Kommentare anzeigen
How to display the results of the system to the matlab gui that was made?, why the GUI can't display the result? Instead it displays in Command Window wich a place for dispaly debug?

with the script I use yet also displays the results of the system to the matlab gui.
function Pengujian_Callback(hObject, eventdata, handles)
% hObject handle to Pengujian (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
set(handles.kondisi,'string','PENGUJIAN')
set(handles.input,'string','U');
U = load ('datauji.dat')
X = U (1: 30, 1: 6);
Y = U (1: 30, 6)
ket = get(handles.input,'value');
DATA2 = [X];
n2 = size(DATA2,2)
Input_Uji = DATA2(1: 30, 1: n2-1)'
Target_Uji = DATA2(1: 30, n2)'
Umaks=max(Input_Uji)
Umaks2=Umaks'
Umaks3=max(Umaks2)
%Preprocessing
Unormal=Input_Uji/Umaks3
%Pengujian
load data_latih
load kolom_latih
load latih
load latih_120_80_2_Lr04_Mc07_traingdx.mat
yu=(sim(net,Unormal))
yu2=round(sim(net,Unormal))
E3=mse(Target_Uji'-yu')
%Evaluasi Output Jaringan
[m1,b1,r1]=postreg(yu,Target_Uji)
handles.edtmse.String = num2str(E3);
handles.edtm.String = num2str(m1);
handles.edtb.String = num2str(b1);
handles.edtr.String = num2str(r1);
k=[1: size(Unormal,2)];
%-------------------------------------------------------------------------
20 Kommentare
Image Analyst
am 24 Aug. 2017
Bearbeitet: Image Analyst
am 24 Aug. 2017
Read this http://www.mathworks.com/matlabcentral/answers/13205#answer_18099 and fix your formatting. Then attach the .m and .fig file so we can fix it.
Variables like E3 are echoed to the command window because when you assigned them you did not have a semicolon at the end of the line.
The handles.edtWhatever.String assignment should send the number to the GUI. Not sure why it's not. Are you sure it executes those lines of code (set a breakpoint there)?
Walter Roberson
am 24 Aug. 2017
If you are executing R2014a or earlier, assigning to a String field like you do here would not have the effect you wanted; you would need to use set() instead of assignments. But for R2014b or later it looks reasonable for setting the strings.
Stephen23
am 28 Aug. 2017
Dear Image Analyst.
Thank you have answered my question, Sir. The link can't be opened. If i less for the semicolon, i've tried to put it but the result is E3 can't display. Along with this paper, I attach the file extension file extension. m and file extension .fig which I use. Please help Sir
Stephen23
am 28 Aug. 2017
Dear Walter Roberson.
Thank you have answered my question, Sir. I use the Matlab version 7.0.4.365. I've tried using the set (), but the result remains the same, it does not appear in the matlab gui I've created.
Stephen23
am 28 Aug. 2017
@syarifah cambami: please use comments for commenting, not answers.
Walter Roberson
am 28 Aug. 2017
set(handles.edtmse, 'String', num2str(E3) )
and so on.
syarifah cambami
am 30 Aug. 2017
syarifah cambami
am 30 Aug. 2017
syarifah cambami
am 30 Aug. 2017
Walter Roberson
am 30 Aug. 2017
Looks like we need datauji.dat or p.dat in order to run the program.
syarifah cambami
am 30 Aug. 2017
Bearbeitet: syarifah cambami
am 30 Aug. 2017
Walter Roberson
am 30 Aug. 2017
zip the two .dat files and attach the .zip here.
In order to do anything with your code, it is necessary to use the BackPropagation menu to select one of the two choices. The upper choice requires the file p.dat and the lower choice requires datauji.dat in order to go any further.
syarifah cambami
am 30 Aug. 2017
Walter Roberson
am 30 Aug. 2017
You appear to be using a MATLAB version dating back to about R2011b or so. Please indicate which MATLAB version you are using.
syarifah cambami
am 1 Sep. 2017
Walter Roberson
am 1 Sep. 2017
I will have to dig around to see if I still have a version of MATLAB that old installed anywhere.
Walter Roberson
am 1 Sep. 2017
It appears that I do not have a MATLAB that old installed with the NN toolbox present.
syarifah cambami
am 1 Sep. 2017
Walter Roberson
am 1 Sep. 2017
Bearbeitet: Walter Roberson
am 1 Sep. 2017
I have access to installers for MATLAB that old; the difficulty is with the licensing. Versions that old used the PLP licensing scheme, which permitted only 6 digit license numbers, but my license number is 7 digits. I would need to get Mathworks to create special keys for me.
I will have another look through my email archives to see whether my MATLAB 6.5 (R13) key would be enough to allow me to install NN for that release.
Walter Roberson
am 1 Sep. 2017
Okay, I have managed to install R14 with NN. It turns out that I need to know what values you are entering for each of the input boxes.
Antworten (1)
Stalin Samuel
am 1 Sep. 2017
0 Stimmen
set(handles.edtm, 'String', num2str(E3));
4 Kommentare
Walter Roberson
am 1 Sep. 2017
That does not solve the problem. The user has coded a reference to a non-existent field in one part of the code. When that is fixed, other errors show up if the code is run under any reasonably new MATLAB release (R2011b or so is probably the newest that it might work with.)
Stalin Samuel
am 1 Sep. 2017
I think the code attached is only the part and he may have definitions of fields in some other part of the code
Walter Roberson
am 1 Sep. 2017
The user attached a .fig along with the .m; together they form a GUIDE created GUI. The field definitions are in the .fig
Stephen23
am 1 Sep. 2017
Dear Stalin Samuel
Thank you have answered my question, Sir. I've tried it but still no change. As shown below :

Kategorien
Mehr zu File Operations finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


