How to display the results of the system to the matlab gui that was made?

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
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)?
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.
syarifah cambami's "Answer" moved here:
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
syarifah cambami's "Answer" moved here:
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.
@syarifah cambami: please use comments for commenting, not answers.
set(handles.edtmse, 'String', num2str(E3) )
and so on.
Dear Stephen Cobeldick
Thank you Sir, and I'm sorry I don't know should answer in the comments, I am new to using matlab and this forum.
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 .m and file extension .fig wich I use. Please help Sir.
Dear Walter Roberson
I've tried it Sir, and an error in the command window, as seen in this picture. Please help Sir.
Looks like we need datauji.dat or p.dat in order to run the program.
Dear Walter Roberson
Pardon,the meaning is call datauji.dat or p.dat like this picture Sir? I also try to run but the result like the above. And I'm sorry Sir, I have not been able to send the file datauji.dat and the file p.dat, because dat extension it is not available.
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.
Dear Walter Roberson
Well Sir, here I attach file .dat in .zip file. I wish you will help me. Thank you so much Sir.
You appear to be using a MATLAB version dating back to about R2011b or so. Please indicate which MATLAB version you are using.
Sorry Sir, I forgot my matlab version that I use. The existence of this image may be a bit describes the version of matlab I use.
I will have to dig around to see if I still have a version of MATLAB that old installed anywhere.
It appears that I do not have a MATLAB that old installed with the NN toolbox present.
I have old version of matlab, but I can not send it to you because the size is bigger than the maximum size. So, how about your opinion? I nees your help.
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.
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.

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Stalin Samuel
Stalin Samuel am 1 Sep. 2017
set(handles.edtm, 'String', num2str(E3));

4 Kommentare

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.)
I think the code attached is only the part and he may have definitions of fields in some other part of the code
The user attached a .fig along with the .m; together they form a GUIDE created GUI. The field definitions are in the .fig
syarifah cambami' "Answer" moved here:
Dear Stalin Samuel
Thank you have answered my question, Sir. I've tried it but still no change. As shown below :

Melden Sie sich an, um zu kommentieren.

Kategorien

Gefragt:

am 24 Aug. 2017

Kommentiert:

am 1 Sep. 2017

Community Treasure Hunt

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

Start Hunting!

Translated by