Subido por Guadalupe Capia

Ejercicios de MATLAB

Anuncio
UNIVERSIDAD NACIONAL DE JULICA
ESCUELA PROFESIONAL DE ENERGIAS RENOVABLES
PROGRAMACION PARA LA INGENIERIA
APELLIDOS Y NOMBRES:CAPIA L.J.G
EJERCICIOS PROPUESTOS
1.>> A=[1 2 3; 4 5 6 ; 7 8 9]
a)>> A(1:3,2:3)
b)>> diag(A)
c)>> A'
d)>> A(3,4)=22
e)>> A(1:3,1:3)
f)>> A(1:3,[1 3])
2.>> B=[1 2 3 4; 5 6 7 8; 9 10 11 12; 13 14 15 16]
a)>> B(1:4,[2 4])
b)>> diag(B)
c)>> B'
d)>> B(4,5)=18
e)>> B(1:4,1:4)
f)>> B(1:4,1:3)
3.-CONSIDERE EL SISTEMA LINEAL:
Ecuación 1:
a)representar gráficamente cada sistema lineal
>> [x,y]=meshgrid(-6:2.6:8);
>> z=(1-x+2*y)/3;
>> surf(x,y,z)
Ecuación 2:
>> [x,y]=meshgrid(-2:4.2:6);
>> z=(1+4*x+y)/2;
>> surf(x,y,z)
Ecuación 3:
>> [x,y]=meshgrid(-4:4.2:5);
>> z=(2-2*x+y)/4;
>> surf(x,y,z)
b) Representar las matrices correspondientes en MATLAB:
>> a=[1 -2 3; 4 1 -2; 2 -1 4]
C)resolver el sistema de ecuaciones:
>> inv(a)*b
4.-CONSIDERE EL SISTEMA LINEAL:
a) representar gráficamente cada sistema de ecuación lineal.
Ecuación 1:
>> [x,y]=meshgrid(-5:2.3:5);
>> z=(7-4*x+y);
>> surf(x,y,z)
Ecuación 2:
>> [x,y]=meshgrid(-2:4.8:4);
>> z=(-21-4*x+8*y);
surf(x,y,z)
Ecuación 3:
>>
[x,y]=meshgrid(-6:4.7:12);
>> z=(15+2*x-y)/5;
>> surf(x,y,z)
b) representar las matrices:
>> a= [4 -1 1; 4 1 -2; 2 -1 4]
>> b= [7;-21;15]
c)resolver e3l sistema de ecuaciones:
>> inv(a)*b
5.-CONSIDERE EL SISTEMA LINEAL:
a) representar gráficamente cada sistema de ecuación lineal.
Ecuación 1:
>> [x,y]=meshgrid(-8:2.3:8);
>> z=(12+2*x-y)/3;
>> surf(x,y,z)
Ecuacion 2:
>> [x,y]=meshgrid(-7:3.10:2);
>> z=(10-x-2*y)/5;
>> surf(x,y,z)
Ecuación 3:
>> [x,y]=meshgrid(-6:2.6:2);
>> z=(24-6*x+3*y)/9;
>> surf(x,y,z)
b) representar las matrices correspondientes en Matlab
>> a=[-2 1 3; 1 2 5; 6 -3 -9]
>> b=[12;10;24]
c)resolver el sistema de ecuaciones
>> inv(a)*b
Descargar