GUI with fuzzy logic
1 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Thanks for your time to review my question. Here is my problem with matlab. I built a FIS by fuzzy toolbox, now i want export string value from GUI edit-text to FIS and then run this FIS by clicking a push-button. I wrote evafis under push-buttonm call back. But the fuzzy process did not respond and output did not pop out. Please give me some ideas about my problem.thanks.
% --- Executes on button press in fuzzy_1. function fuzzy_1_Callback(hObject, eventdata, handles) % hObject handle to fuzzy_1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) function f1= fuzy_likelihood(h,eventdata,handles,varargin) % Get user input from GUI design.likelihood = total.d; incorrect.operation.likelihood = total.t; tpd.likelihood = total.c; corrosion.likelihood = total.i; % load an FIS from the disk ----------------------------------------------------------- f1 = readfis('Total_likelihood'); % perform fuzzy inference calculations ------------------------------------------------ fuzzy.out1 = evalfis([total.d total.t total.c total.i], f1); % evalfis([inputs], myfis) output1= fuzzy.out1; set(handles.fuzzy_edit_text1,'String',output1); guidata(hObject, handles);
0 commentaires
Réponses (1)
Afshin Salehi
le 30 Mai 2014
Hi win ge! it looks that your code is true, but you cannot use syntax "fuzzy" as an user variable. you wrote: "fuzzy.out1 = ..." , this type of programming is in chance of error. you can write as bellow: "my_fuzzy.out1 = ..." . contact me if this comment is ambiguous. this is my email: "salehi.put@gmail.com"
0 commentaires
Voir également
Catégories
En savoir plus sur Fuzzy Logic Toolbox dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!