Effacer les filtres
Effacer les filtres

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?

1 vue (au cours des 30 derniers jours)
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

Réponse acceptée

Silke
Silke le 6 Déc 2012
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

Plus de réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by