Matlab GUI displaying output based on user input
1 回表示 (過去 30 日間)
古いコメントを表示
i want to create one gui with two prompt messages 1. enter semester - I marks 2. enter semester - II marks
After entering marks & pressing OK button . it has to verify one excel file (having three columns of data). When the input data matches with the A column and B column values in excel file then the output is the corresponding C Column value. Display the output of C column's value.
any one help me to write the code for this
0 件のコメント
採用された回答
David Sanchez
2013 年 8 月 20 日
M = xlsread('my_file.xls'); % matrix with data
x=find(M(:,1) == in_1); % in_1 is your first input
y=find(M(:,2) == in_2); % in_1 is your second input
c=find(x==y); % c returns where x==in_1 and y ==in_2
output = M(x(c),3);
3 件のコメント
David Sanchez
2013 年 8 月 20 日
In your case:
in_1 = str2num(ans{1});
in_2 = str2num(ans{2});
M = a;
その他の回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Data Import from MATLAB についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!