Filter löschen
Filter löschen

Display the result of m file in app designer

1 Ansicht (letzte 30 Tage)
Ayman Shaban
Ayman Shaban am 22 Mär. 2022
Kommentiert: Rik am 25 Mär. 2022
Hi, I'm working on code for speech recognition, I finished it and I start making GUI using app designer, I succeeded in take the audio from user and run the code by push button, but i don't know how i get the result in an edit field in my app.
thank you.
  8 Kommentare
Ayman Shaban
Ayman Shaban am 24 Mär. 2022
prediction = trainedClassifier.predictFcn(features);
if prediction == 0
result = 'This case is healthy'
disp('This case is healthy');
elseif prediction == 1
result = 'This case is patient1'
disp('This case is patient1');
elseif prediction == 2
result = 'This case is patient2'
disp('This case is patient2')
elseif prediction == 3
result = 'This case is patient3'
disp('This case is patient3')
else
result = 'This case is patient4'
disp('This case is patient4')
end
like that ?
Rik
Rik am 25 Mär. 2022
No. Remove the lines with disp and add something like this after this code:
set(app.edit1,'String',result)

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Produkte


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by