attempt to solve y,but get numel(y)=1

for j=1:4;
for i=j+1:4;
y(i)=y(i)-A(i,j)*y(i);
end
if A(j,j)==0
break;
else
y(j)=b(j)/A(j,j);
end
end

Answers (1)

Azzi Abdelmalek
Azzi Abdelmalek on 15 Oct 2013
Edited: Azzi Abdelmalek on 15 Oct 2013
Have you initialized y?

Categories

Find more on Loops and Conditional Statements in Help Center and File Exchange

Asked:

on 15 Oct 2013

Edited:

on 15 Oct 2013

Community Treasure Hunt

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

Start Hunting!