You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
How to display the results of the system to the matlab gui that was made?
4 views (last 30 days)
Show older comments
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 Comments
Image Analyst
on 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
on 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
on 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
on 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.
syarifah cambami
on 30 Aug 2017
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.
syarifah cambami
on 30 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 .m and file extension .fig wich I use. Please help Sir.
syarifah cambami
on 30 Aug 2017
Dear Walter Roberson
I've tried it Sir, and an error in the command window, as seen in this picture. Please help Sir.

syarifah cambami
on 30 Aug 2017
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.

Walter Roberson
on 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
on 30 Aug 2017
Dear Walter Roberson
Well Sir, here I attach file .dat in .zip file. I wish you will help me. Thank you so much Sir.
Walter Roberson
on 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
on 1 Sep 2017
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.

Walter Roberson
on 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
on 1 Sep 2017
It appears that I do not have a MATLAB that old installed with the NN toolbox present.
syarifah cambami
on 1 Sep 2017
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.
Walter Roberson
on 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
on 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.
Answers (1)
Stalin Samuel
on 1 Sep 2017
set(handles.edtm, 'String', num2str(E3));
4 Comments
Walter Roberson
on 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
on 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
on 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
on 1 Sep 2017
Dear Stalin Samuel
Thank you have answered my question, Sir. I've tried it but still no change. As shown below :

See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)