Está en la página 1de 8

TERCERO B

>> p1=[1 -2 1]; p2^[1 1];


Undefined function or variable 'p2'.

>> p1=[1 -2 1]; p2=[1 1];


>> % multiplicacion
>> conv(p1,p2)

ans =

-1

-1

>> %division
>> [c,r]=deconv(p1,p2)

c=

r=

-3

>> t
Undefined function or variable 't'.

>> cls
cls
|
Error: The input character is not valid in MATLAB statements or expressions.

>>
>> t=[o:0.5:4]
Undefined function or variable 'o'.

>> t=[0:0.5:4]

t=

0
4.0000

0.5000

1.0000

1.5000

2.0000

2.5000

>> k=10 ; v1[1 2 3]; v2=[4 5 6];


k=10 ; v1[1 2 3]; v2=[4 5 6];
|
Error: Unbalanced or unexpected parenthesis or bracket.

>> k=10; v1=[1 2 3]; v2=[4 5 6];


>> k*v1

ans =

10

20

30

3.0000

3.5000

>> v1+v2

ans =

>> v1.*v2

ans =

10

18

>> conv(v1,v2)

ans =

13

28

27

18

>> %%%%%% GRAFICA DE FUNCIONES


>> t=[0:0:10];% DOMINIO DE REPRESENTACION
>> Y=10*exp(-t)*sin(5*t);% funcion a representar
Error using *
Inner matrix dimensions must agree.

>> t=[0:0:10];% DOMINIO DE REPRESENTACION


Y=10*exp(-t).*sin(5*t);% funcion a representar
>> plot(t,y) % dibuja la grafica
Undefined function or variable 'y'.

>> plot(t,Y) % dibuja la grafica


>> grid%activa la rejilla
>> xlabel(tiempo (s))%etiqueta eje y

xlabel(tiempo (s))%etiqueta eje y


|
Error: The input character is not valid in MATLAB statements or expressions.

>> xlabel(tiempo(s))%etiqueta eje y


xlabel(tiempo(s))%etiqueta eje y
|
Error: The input character is not valid in MATLAB statements or expressions.

>> xlabel('tiempo(s)')%etiqueta eje y


>> yllabel('Y(t)')
Undefined function 'yllabel' for input arguments of type 'char'.

>> Yllabel('Y(t)')
Undefined function 'Yllabel' for input arguments of type 'char'.

>> y=10*exp(-t).*sin(5*t);% funcion a representar


>> ylabel('y(t)')
>> title('Senoide smortiguada')
>> fplot('=10*exp(-t).*sin(5*t)',[0,10])
Error using inlineeval (line 15)
Error in inline expression ==> =10*exp(-t).*sin(5*t)
Error: The expression to the left of the equals sign is not a valid target for
an assignment.

Error in inline/feval (line 34)


INLINE_OUT_ = inlineeval(INLINE_INPUTS_, INLINE_OBJ_.inputExpr,
INLINE_OBJ_.expr);

Error in fplot (line 102)


x = xmin; y = feval(fun,x,args{4:end});

>> fplot('10*exp(-t).*sin(5*t)',[0,10])

>> ylabel('y(t)')
>> title('Senoide smortiguada')
>> title('Senoide smortiguada')
|
Error: Unexpected MATLAB operator.

>> grid%activa la rejilla


>> xlabel('tiempo(s)')
>> ylabel('y(t)')
>> title('Senoide smortiguada')
>> grid on
>> title('Senoide amortiguada')
>> t=[0:pi/180:4*pi];%intervalo de representacion
>> y1=sin(t);
>> y2=cos(t);
>> plot(t,y1,'r o',t, y1,'g-')
>> plot(t,y1,'r -',t, y1,'g-')
>> plot(t,y1,'r o',t, y1,'g-')
>> t=0:0.1:10; % intervalo de represenatacio
>> subplot(2,2,1)% primera subventana de la matriz de graficos 2*2
>> y1=exp(-t);
>> plot(t,y1)
>> subplot(2,2,2)% segunda subventana de la matriz de graficos 2*2
>> y2=t.*exp(-t);
>> plot(t,y2)
>> subplot(2,2,3)% tercera subventana de la matriz de graficos 2*2
>> y3=exp(-t).*cos(t);
>> plot(t,y3)
>> subplot(2,2,4)% cuarta subventana de la matriz de graficos 2*2
>> y4=exp(t).*cos(t);
>> plot(t,y4)

También podría gustarte