MATLAB: How can i export datas from excel and let matlab run it. the excel has names of students and their grades. i have this code for the gading but dont know how to go about itin excel… please what is the best way of going about this

excelexcel to matlab test scorehow to find test score for group of students in matlab

function test_score test_score=input('Enter the test score:'); if((0>test_score)|(test_score>100)) disp('This is not a possible score in my class') elseif((test_score>=90)|(test_score>=100)) disp('A') elseif((test_score>=80)|(test_score>=89)) disp('B') elseif((test_score>=70)|(test_score>=79)) disp('C') elseif((test_score>=60)|(test_score>=69)) disp('D') else disp('F') end

Best Answer

If you want to do this in Matlab you can use xlsread to import the data in Matlab:
name = xlsread('filename', 'sheet', 'range1'); test_score = xlsread('filename', 'sheet', 'range1');
instead of using the "disp" write the grade in a vector and than write this vector into your xls-file by using
xlswrite('filename','vectorname','sheetname','range')
range is something like A1:A100 You should use cells that are empty