%Serie 2 Aufgabe 2 Marco Weber

rand('state',0)
A=rand(4);
[L,R]=lu(A);
i=1;

for alpha=[-1:0.1:1]
   
    b=[1;1;1;alpha];
    c=L\b;
    x=R\c;
    x_1(i)=norm(x,1);
    x_2(i)=norm(x);
    x_3(i)=norm(x,inf);
    i=i+1;
end
alpha=-1;
for i=[1:1:20]
    alpha=-1+i*0.1
    plot(alpha,x_1,'g+:',alpha,x_2,'r-<',alpha,x_3,'b-o')
    
end
    xlabel('alpha')
    ylabel('Norm of solution')
    legend('||x||_1','||x||_2','||x||_inf')