%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 1 ## build a matrix; Why is matrix ?
% one student
studentScores = [90 99 98 85];% gammar math english moral
rates = [0.3 0.3 0.3 0.1];
jiDian = studentScores * rates';
% many students
studentScores = [90 99 98 85 % good style; a line with ';' is ok
80 70 59 90
72 89 65 99];% gammar math english moral
rates = [0.3 0.3 0.3 0.1];
jiDians = studentScores * rates';
% size whos double() uint8() char()
size(studentScores);
whos('studentScores');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 2 ## save : save()
% save studentScores and jiDians in ScoresOfClass1.mat
save('ScoresOfClass1.mat', 'studentScores', 'jiDians');
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 3 ## load : load() sprinf() disp() fop
matlab路径(string)操作及基本data读取保存
最新推荐文章于 2022-04-13 15:21:32 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)