Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
Error: too many outputs
조회 수: 1 (최근 30일)
이전 댓글 표시
function ForwardSub(L,b)
%Forward substitution method to compute Y= L/b
s = length(b); %no of coloumns
Y = zeros(s,1); %the answer Y is initialized to zero
Y(1) = b(1)/L(1,1); %the first diagonal entry
for j=2:s
Y(j)=b(j) - sum(L(j, 1:j-1)).*Y(1:j-1)/L(j,j); %solve for other elements of Y
end
end
댓글 수: 0
답변 (1개)
madhan ravi
2020년 2월 25일
function Y = ForwardSub(L,b) % you forgot to assign the output in the function definition
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!