how to display output in Matlab gui?
조회 수: 2 (최근 30일)
이전 댓글 표시
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
댓글 수: 0
채택된 답변
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Export to MATLAB에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!