Professional Documents
Culture Documents
25:3;
>> x
x =
Columns 1 through 13
Columns 14 through 25
>> x=x'
x =
-3.0000
-2.7500
-2.5000
-2.2500
-2.0000
-1.7500
-1.5000
-1.2500
-1.0000
-0.7500
-0.5000
-0.2500
0
0.2500
0.5000
0.7500
1.0000
1.2500
1.5000
1.7500
2.0000
2.2500
2.5000
2.7500
3.0000
>> y=(13-7*x)/4
y =
8.5000
8.0625
7.6250
7.1875
6.7500
6.3125
5.8750
5.4375
5.0000
4.5625
4.1250
3.6875
3.2500
2.8125
2.3750
1.9375
1.5000
1.0625
0.6250
0.1875
-0.2500
-0.6875
-1.1250
-1.5625
-2.0000
>> plot(x,y)
>> xlabel('Eje x')
>> ylabel('eje y')
>> title('sistema de ec lin con 2 incognitas')
>> title('Sistema de ec lin con 2 incognitas')
>>
-------------------------------------------ejercicio
3----------------------------------------------------------------------------------
-----
ejercicio2
>> x=linspace(-20,20,40);
>> y=(13-7*x)/2;
>> y1=(5*x-19)/2;
>> plot(x,y)
>> hold on
>> plot(x,y1)
>> grid on
>> A=[100 200,300 400]
A =
A =
100 200
300 400
A =
7 4
5 -2
>> A_inversa=inv(A);
>> b=[13;19]
b =
13
19
>> solucion=A_inersa*b
Unrecognized function or variable 'A_inersa'.
solucion =
3.0000
-2.0000
B =
1 1 1
2 -1 -1
1 2 -1
B =
1 1 1
2 -1 1
1 2 -1
>> b1=[12;7;6]
b1 =
12
7
6
>> inversa_B=inv(B)
inversa_B =
>> sol=inversa_B*b1
sol =
3.0000
4.0000
5.0000