Azzera filtri
Azzera filtri

Display the result of m file in app designer

1 visualizzazione (ultimi 30 giorni)
Ayman Shaban
Ayman Shaban il 22 Mar 2022
Commentato: Rik il 25 Mar 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 Commenti
Ayman Shaban
Ayman Shaban il 24 Mar 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 il 25 Mar 2022
No. Remove the lines with disp and add something like this after this code:
set(app.edit1,'String',result)

Accedi per commentare.

Risposte (0)

Prodotti


Release

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by