求答疑,为毛结果不对啊~我的大脑可能陷入死机状了~
matlab吧
全部回复
仅看楼主
level 1
阿汉gg 楼主
%MaxPivot(A,currentRow,column)
%returns a row index i such that the absolute value of A(i,column) is maximum among A(currentRow,column),A(currentRow+1,column),...,A(m,column)
function[result] = MaxPivot(A,currentRow,column)
[m,n] = size(A);
temp = 0;
for j = currentRow:m
if abs(A(j,column)) > abs(temp)
temp = A(j,column);
i = j;
end
end
result = i;
2011年09月10日 16点09分 1
level 1
阿汉gg 楼主
小弟已经被整绝望了~可恶的作业啊~
2011年09月10日 16点09分 2
level 9
你这个问题是什么,出现了什么结果
2011年09月11日 00点09分 3
level 1
阿汉gg 楼主
我错了~结果是对的,我的大脑果然死机了。
多谢楼上。
问题的要求在开头的注释里。
2011年09月11日 10点09分 4
1