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

采纳的回答

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 中查找有关 Data Export to MATLAB 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by