Post on 03-Nov-2015
description
[]Nombre : Miguel Luna Curso: 3 B de elctricaFecha: 24-04-14A=[1 2 3;3 4 5;6 7 8]
A =
1 2 3 3 4 5 6 7 8
>> c=[1 2 3]
c =
1 2 3
>> B=[1;2;3]
B =
1 2 3
>> a=1; b=a; c=13;>> x1=(-b+sqrt(b^2-4*a*c))/(2*a)
x1 =
-0.5000 + 3.5707i
>> >> a=1; b=4; c=13;x1=(-b+sqrt(b^2-4*a*c))/(2*a)
x1 =
-2.0000 + 3.0000i
>> x2=(-b-sqrt(b^2-4*a*c))/(2*a)
x2 =
-2.0000 - 3.0000i
>> p=[2 7 1]
p =
2 7 1
>> q=[1 0 3 0]
q =
1 0 3 0
>> p=[1 5 8 1];>> polyval(p,2)Undefined function 'polyval' for input arguments of type 'double'. >> polyval(1 2,2) polyval(1 2,2) |Error: Unexpected MATLAB expression. >> >> q=[1 5 8 1];>> polyval(q,2)Undefined function 'polyval' for input arguments of type 'double'.>> p=[1 -3 9 13];>> roots(p)Undefined function 'roots' for input arguments of type 'double'.
>> t=[0:0.5:4]
t =
0 0.5000 1.0000 1.5000 2.0000 2.5000 3.0000 3.5000 4.0000
>> k=10; vl=[1 2 3]; v2=[4 5 6];>> >> k*vl
ans =
10 20 30
>> vl+v2
ans =
5 7 9''>> v1.*v2Undefined function or variable 'v1'.>> t=[0;0.1:10]; %dominio de representacionError using vertcatCAT arguments dimensions are not consistent. >> t=[0:0.1:10]; %dominio de representacion>> y=10*exp(-t).*sin(5*t); % funcion a representar>> plot(t,y) % dibuja la grafica>> grid % activa la rejilla>> xlabel(tiempo(s))% etiquete eje x xlabel(tiempo(s))% etiquete eje x |Error: The input character is not valid in MATLAB statements or expressions.
>> xlabel('tiempo(s)')% etiquete eje x>> ylabel('y(t)')% etiqueta eje y>> title ('senoide amortiguada') % titulo>> plot(t,y,'r*') % colores>>grid on % activa rejilla
'>> grid on % activa rejilla>> fplot('10*exp(-t).*sin(5*t)',[0,10])>> grid% activa rejilla>> xlabel('tiempo(s)')% etiquete eje x>> ylabel('y(t)')% etiqueta eje y>> title ('senoide amortiguada') % titulo
>> t=[0:pi/180:4*pi]; % intervalo de representacion>> y1=sin(t);>> y2=cos(t);>> plot(t, y1, 'r o', t, y2, 'g-')>>
>> t=[0:pi/180:4*pi]; % intervalo de representacion>> y1=sin(t);>> y2=cos(t);>> plot(t, y1, 'r o', t, y2, 'g-')>> >> t=0:0.1:10;>> subplot(2,2,1)>> y1=exp(-t);>> plot(t,y1)>> subplot(2,2,2)>> y2=t.*exp(-t);>> plot(t,y2)>> subplot(2,2,3)>> y3=exp(-t).*cos(t);>> plot(t,y3)>> subplot(2,2,4)>> y4=exp(t).*cos(t);>> plot(t,y4)