第1个回答 2012-04-29
a=input('请输入的矩阵a=');
[m,h]=max(a);
[mp,hp]=max(m);
h=[h(hp),hp];
disp('最大值为');
disp(mp);
disp('所在位置为');
disp(h);
第2个回答 2012-04-19
能自己先动动手吗??
=======
//m,n,temp,m,n代表了位置,temp表示了最大值!
int i,j,m,n,temp;
temp=a[0][0];
for(i=0;i<=3;i++)
for(j=0;j<4;j++)
{
if(temp<=a[i][j])
{
temp=a[i][j];
m=i,n=j;
}
}