how to display output in Matlab gui?

2 visualizaciones (últimos 30 días)
Dimple
Dimple el 20 de Ag. de 2013
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

Respuesta aceptada

Image Analyst
Image Analyst el 20 de Ag. de 2013
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));

Más respuestas (0)

Categorías

Más información sobre Data Export to MATLAB en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by