Find the attachment of the xls file that has the student ID, Name, Branch and others ( total 7 coloums )

I have written the matlab code already those who got less than 75% of attendance for the given attached excel file. What actually I need is the Ht No, Student Name and average which should be displayed in the another excel sheet those who got less than 75% of attendance?

 採用された回答

KL
KL 2018 年 3 月 2 日
編集済み: KL 2018 年 3 月 2 日
If you're using tables, store your filtered data in a new table and use writetable
T = your_actual_table;
T_filtered = T(T.AttendencePercent>=0.75,{'No','Name','Average'});
writetable(T_filtered, filename)

8 件のコメント

Manoj
Manoj 2018 年 3 月 2 日
[num,txt,raw]=xlsread('attendance.xlsx'); Actually it reads the entire thing in a raw as cells . I need to convert cell 2 matrix and the rest is above Thank you
KL
KL 2018 年 3 月 2 日
which version are you using?
As per KL's answer, if you're using any recent version of matlab use readtable and writetable instead of the outdated xlsread and xlswrite. It will make your life much easier.
t = readtable('attendance.xlsx')
will most likely read the file correctly, automatically detecting the type of each column and if present, use the header to name the columns of the table.
Manoj
Manoj 2018 年 3 月 2 日
I got the table in my version Can u help me code for the percentage those who got less than 75
KL
KL 2018 年 3 月 2 日
in your question you say ...I have written the matlab code already those who got less than 75% of attendance...
Nevertheless, if you have a table, I've already shown you how to filter the rows and columns (second line of the code I gave you!).
Manoj
Manoj 2018 年 3 月 2 日
Thank you very much I got the output accordingly once again thank you
KL
KL 2018 年 3 月 2 日
Glad to help!
Try this,
T = readtable('filename.xls');
T(strcmp(T.Branch,'CIV'),:)
T(T.Average>=60,:)

サインインしてコメントする。

その他の回答 (0 件)

タグ

質問済み:

2018 年 3 月 2 日

コメント済み:

KL
2018 年 3 月 2 日

Community Treasure Hunt

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

Start Hunting!

Translated by