フィルターのクリア

How to write a program which gives output in form of table for students grade and each time i run the program the marks for each student should change randomly?

1 回表示 (過去 30 日間)
Need the program like this type
Student1= 'any random name'
%random marks
marks1= randi(100,1)
%assigning grade
if marks1<100 & marks1>=90
grade1= 'A'
....
end
% NOW THE MAIN PART DISPLAYING THE OUTPUT IN FORM OF TABLE FOR 10 STUDENTS
?????
  1 件のコメント
Dyuman Joshi
Dyuman Joshi 2022 年 5 月 21 日
What have you tried yet? What is the problem/error you are facing? Did you try a simple search on the internet to find any similar problems? Because there are many similar questions just on this forum alone that have been answered!
Don't expect anyone here to write full code for you.

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

回答 (1 件)

Chandra
Chandra 2022 年 5 月 24 日
Hi,
Please refer to writetable function
example
LastName = {'Smith';'Johnson';'Williams';'Jones';'Brown'};
Age = [38;43;38;40;49];
Height = [71;69;64;67;64];
Weight = [176;163;131;133;119];
BloodPressure = [124 93; 109 77; 125 83; 117 75; 122 80];
T = table(Age,Height,Weight,BloodPressure,...
'RowNames',LastName)
writetable(T,'myPatientData.dat','WriteRowNames',true)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

製品


リリース

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by