필터 지우기
필터 지우기

How to display the output of a conditional sentence in MATLAB "GUI window" and not in "command window" after writing the conditional sentence in "script window"?

조회 수: 2 (최근 30일)
grade = 80; % example
grade=80(for example) if grade > 95 printf('The grade is A'); elseif grade <= 95 & grade > 86 fprintf('The grade is B'); elseif grade <= 86 & grade > 76 fprintf('The grade is C'); elseif grade <= 76 & grade > 66 fprintf('The grade is D'); else fprintf('The grade is F');
Now the output of this above mentioned conditional sentence is "The grade is c". Now the main problem is the output "The grade is c" is displayed in the command window. How can I make the output of this conditional sentence to be displayed in GUI window?

답변 (1개)

Joakim Magnusson
Joakim Magnusson 2014년 8월 13일
I'm not sure I understand your problem, but can't you just put a text box in your GUI and write your output there?

카테고리

Help CenterFile Exchange에서 Characters and Strings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by