필터 지우기
필터 지우기

Display the result of m file in app designer

조회 수: 1 (최근 30일)
Ayman Shaban
Ayman Shaban 2022년 3월 22일
댓글: Rik 2022년 3월 25일
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
Ayman Shaban
Ayman Shaban 2022년 3월 24일
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 2022년 3월 25일
No. Remove the lines with disp and add something like this after this code:
set(app.edit1,'String',result)

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Speech Recognition에 대해 자세히 알아보기

제품


릴리스

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by