Professional Documents
Culture Documents
TPN2 Commande
TPN2 Commande
TPN2
n=
1 2 1579 5 7 73 578 38 9
n=
1 2 1579
5 7 73
578 38 9
3- >> N=n'
N=
1 5 578
2 7 38
1579 73 9
4- >> det(n)
ans =
-6.0070e+06
5- >> inv(n)
ans =
6- >> n*ans
ans =
7- >> n
n=
1 2 1579
5 7 73
578 38 9
8- >> b=[2;-3;4]
b=
2
-3
4
9- >> x=n\b
x=
0.0381
-0.4750
0.0018
• H/W2: Use MATLAB commands to get exactly as the figure shown below ,where
>> plot(x,y,'+:b', 'linewidth', 2, 'MarkerSpacing', 10)
>> hold off
>> plot(x,z,'r-', 'linewidth', 2)
>> title('Sin and Cos Curves')
>> xlabel('Angle')
>> ylabel('Value')
>> legend('Sin(x)', 'Cos(x)')
>> axis([0 2*pi -1 1])