필터 지우기
필터 지우기

how to display output in Matlab gui?

조회 수: 2 (최근 30일)
Dimple
Dimple 2013년 8월 20일
prompt{1}='Enter 1st grade :';
prompt{2}='Enter 2nd grade :';
name='result';
answer=inputdlg(prompt,name);
a=xlsread('inputdata.xlsx');
excel file values are
0.1 0.1 0.1
0.1 0.2 0.1
0.1 0.3 0.1
0.1 0.4 0.2
0.1 0.5 0.2
0.1 0.6 0.2
0.1 0.7 0.3
0.1 0.8 0.3
0.2 0.1 0.1
0.2 0.2 0.2
0.2 0.3 0.2
0.2 0.4 0.2
0.2 0.5 0.3
0.2 0.6 0.3
0.2 0.7 0.3
0.2 0.8 0.4
0.3 0.1 0.1
0.3 0.2 0.2
0.3 0.3 0.2
1st grade values are in 1st column
2nd grade values are in 2nd column
if user enter values for 1st and 2nd grade, then it has to display the output. output is the corresponding 3rd column value.
for eg:
Enter 1st grade : 0.2
Enter 2nd grade :0.8
output is 0.4
please give me a solution

채택된 답변

Image Analyst
Image Analyst 2013년 8월 20일
You'll need to understand this entry in the FAQ before you complete your homework exercise: http://matlab.wikia.com/wiki/FAQ?&cb=7634#Why_is_0.3_-_0.2_-_0.1_.28or_similar.29_not_equal_to_zero.3F
Another hint, to display a value
message = sprintf('The value is %.2f', someValue);
uiwait(msgbox(message));

추가 답변 (0개)

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by