Info

この質問は閉じられています。 編集または回答するには再度開いてください。

Error: too many outputs

1 回表示 (過去 30 日間)
Shelby Schreckenberg
Shelby Schreckenberg 2020 年 2 月 25 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
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

回答 (1 件)

madhan ravi
madhan ravi 2020 年 2 月 25 日
function Y = ForwardSub(L,b) % you forgot to assign the output in the function definition

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by