From sztu 自动化~
1.题目
2.答案
2.1
A =ones(5,5);
B=ones(5,5)*10;
%1(1)操作
B(2:5,[1,3,5])=A(2:5,[1,3,5]);
%1(2)操作
A(5)=[];
2.2
%2
X=rand(1,12)*10;
reshape(X,[3,4]);
2.3
A = [25,6,42,2;41,-45,65,5;6,-10,45,9.9;9,2,6,5];
%3(1)
B = A(1:3,:);
C = A(:,1:2);
D = A(end-2:end,end-1:end);
E = B*C;
%3(2)
E<D
E&D
E|D
~E|~D
find(A>=10&A<25)
2.4
%4
grades=input('请输入成绩:');
if grades>=90&&grades<=100
disp('A');
elseif grades>=80&&grades<=89
disp('B');
elseif grades>=70&&grades<=79
disp('C');
elseif grades>=60&&grades<=69
disp('D');
elseif grades<60&&grades>=0
disp('F');
else
disp('程序出错');
end