Effacer les filtres
Effacer les filtres

Display the result of m file in app designer

1 vue (au cours des 30 derniers jours)
Ayman Shaban
Ayman Shaban le 22 Mar 2022
Commenté : Rik le 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 commentaires
Ayman Shaban
Ayman Shaban le 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 le 25 Mar 2022
No. Remove the lines with disp and add something like this after this code:
set(app.edit1,'String',result)

Connectez-vous pour commenter.

Réponses (0)

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by