1.
2.
3.x=input('请输入数据'); str=num2str(x);%转换字符串 str1=''; long=length(str);%字符串长度 for i=1:length(str) str1=strcat(str1,str(long)); long=long-1; end result=str1; disp('逆序数为'); disp(result);
4.`function x=max(g)
y=max(max(g))
[row,cell]=find(g==y);
disp(‘row=’);
disp(row);
disp(‘cell=’);
disp(cell);
end
`
5.
function x=f(v)
x=median(v)
end
7.
for i=1:1100
boll=1;
for j=2:i-1
if(mod(i,j)==0)
boll=0;
end
if boll
disp(i);
end
end