Académique Documents
Professionnel Documents
Culture Documents
2
4
7
3
5
8
>> B= [1 2 3
B= [ 1 ; 2 ;3]
B= [ 1 ; 2 ;3]
|
Error: The expression to the left of the equals sign is not a valid target for an
assignment.
>> B= [ 1 ; 2 ;3]
B=
1
2
3
>> C = [ 1 2 3]
C=
1
>>
>>
>>
>>
x1 =
-2.0000 + 3.0000i
>> x2=(-b-sqrt(b^2-4*a*c))/(2*a)
x2 =
-2.0000 - 3.0000i
>> q = [ 1 0 3 0 ]
q=
1
>> polyval(P,2)
ans =
45
>> %RAICES DE UN POLINOMIO
>> p=[1 -3 9 13];
>> roots(p)
ans =
2.0000 + 3.0000i
2.0000 - 3.0000i
-1.0000
>> % RECONSTRUCCION DE UN POLINOMIO APARTIR DE LAS RAICES
>> raices=[-1 2+3i 2-3i];
>> poly(raices)
ans =
1
-3
13
-1
-1
>> %division
>> [c,r]= deconv(p1,p2)
c=
1
-3
r=
4
0.5000
1.0000
1.5000
2.0000
2.5000
3.0000
3.5000
1.0000
1.5000
2.0000
2.5000
3.0000
3.5000
>> t=[0:0.5:4]
t=
0
4.0000
>>
>>
>>
>>
0.5000
ans =
10
20
30
>> %v1+v2
>> v1+v2
ans =
5
>> %v1.*v2
>> v1.*v2
ans =
4
10
18
>> v1.^v2
ans =
1
32 729
>> %v1.^v2
>> v1.^v2
ans =
1
32 729
%UTILIZANDO fplot
fplot('10*exp(-t).*sin(5*t)',[0;10])
grid
xlabel('tiempo(s)')
ylabel('y(t)')
title('Senoidal Amortiguada')
>> %GRAFICA
>> t=[0:pi/180:4*pi];
>> y1=sin(t);
>> y2=cos(t);
>> plot(t,yl,'r o',t,y2,'g-')
Undefined function or variable 'yl'.
>> plot(t,y1,'r o',t,y2,'g-')
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)
grid on