You are on page 1of 7

f=[3 0 1 0 -1];

>>

>> roots(f)

ans =

-0.6590 + 0.0000i

0.0000 + 0.8761i

0.0000 - 0.8761i

0.6590 + 0.0000i

>> polyval(f,1)

ans =

>> g=[8 -6 4 3 1];

>> conv(f,g)

ans =

24 -18 20 3 -1 9 -3 -3 -1

>> residue(f,g)

ans =

0.2199 + 0.0549i
0.2199 - 0.0549i

-0.0793 + 0.1766i

-0.0793 - 0.1766i

>> polyder(f)

ans =

12 0 2 0

>> polyder(f,g)

ans =

192 -126 120 15 -4 27 -6 -3

>> a=[2 4 6];

>> b=[5 9 2];

>> plot(a,b)

>> bar(a,b)

>> stairs(x,y)

Undefined function or variable 'x'.

>> stairs(a,b)

>> polar(a,b)

>> pie(a,b)

>> rose(a,b)

>> title(`lenguaje de programacion´)

title(`lenguaje de programacion´)
|

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

>> y=1:13

y=

1 2 3 4 5 6 7 8 9 10 11 12 13

>> 0:2:16;

>> y=0:2:16;

>> plot(x,y)

Undefined function or variable 'x'.

>> x=0:3:21;

>> plot(x,y,'c y')

Error using plot

Vectors must be the same length.

>> plot(x,y,'c o')

Error using plot

Vectors must be the same length.

>> plot(y,x,'c -o')

Error using plot

Vectors must be the same length.

>> plot(x,y,'c -o')

Error using plot


Vectors must be the same length.

>> plot(y,x,'c -p')

Error using plot

Vectors must be the same length.

>> c=1:50;

>> d=sin(c)+c.^2;

>> d=sin(c)+c.^2

d=

1.0e+03 *

Columns 1 through 8

0.0018 0.0049 0.0091 0.0152 0.0240 0.0357 0.0497 0.0650

Columns 9 through 16

0.0814 0.0995 0.1200 0.1435 0.1694 0.1970 0.2257 0.2557

Columns 17 through 24

0.2880 0.3232 0.3611 0.4009 0.4418 0.4840 0.5282 0.5751

Columns 25 through 32

0.6249 0.6768 0.7300 0.7843 0.8403 0.8990 0.9606 1.0246


Columns 33 through 40

1.0900 1.1565 1.2246 1.2950 1.3684 1.4443 1.5220 1.6007

Columns 41 through 48

1.6808 1.7631 1.8482 1.9360 2.0259 2.1169 2.2091 2.3032

Columns 49 through 50

2.4000 2.4997

>> plot(c,d,'m -p')

>> fl=sin(c+pi/180)+c.^2)

fl=sin(c+pi/180)+c.^2)

Error: Unbalanced or unexpected parenthesis or bracket.

>> fl=sin(c+pi/180)+c.^2;

>> z=1:10;

>> q=(2*z.)

q=(2*z.)

Error: Unbalanced or unexpected parenthesis or bracket.

>> q=(2*z.^2+log(z))./(z+1);

>> w=z.^2.*(1./z);

>> plot(z,q,'*r-',z,w,'b<-')
>> plot(z,q,'*r-',z,w,'b<-'),title('grafi'),xlabel('val Q'),ylabel('val W')

>> subplot(1,2,1),plot(z,q,'*r-',z,w,'b<-'),title('grafi'),xlabel('val Q'),ylabel('val W'),grid

>> subplot(1,2,2),plot(z,q,'*r-',z,w,'b<-'),title('grafi'),xlabel('val Q'),ylabel('val W'),grid

>> subplot(1,2,8),plot(z,q,'*r-',z,w,'b<-'),title('grafi'),xlabel('val Q'),ylabel('val W'),grid

Error using subplot (line 109)

Index exceeds number of subplots.

>> subplot(1,2,3),plot(z,q,'*r-',z,w,'b<-'),title('grafi'),xlabel('val Q'),ylabel('val W'),grid

Error using subplot (line 109)

Index exceeds number of subplots.

>> subplot(1,0,2),plot(z,q,'*r-',z,w,'b<-'),title('grafi'),xlabel('val Q'),ylabel('val W'),grid

Error using subplot (line 109)

Index exceeds number of subplots.

>> subplot(2,2,4),plot(z,q,'*r-',z,w,'b<-'),title('grafi'),xlabel('val Q'),ylabel('val W'),grid

>> subplot(1,2,2),plot(z,q,'*r-',z,w,'b<-'),title('grafi'),xlabel('val Q'),ylabel('val W'),grid

>> subplot(1,1,3),plot(z,q,'*r-',z,w,'b<-'),title('grafi'),xlabel('val Q'),ylabel('val W'),grid

Error using subplot (line 109)

Index exceeds number of subplots.

>> subplot(1,2,3),plot(z,q,'*r-',z,w,'b<-'),title('grafi'),xlabel('val Q'),ylabel('val W'),grid

Error using subplot (line 109)

Index exceeds number of subplots.

>> subplot(1,2,2),plot(z,q,'*r-',z,w,'b<-'),title('grafi'),xlabel('val Q'),ylabel('val W'),grid

>> subplot(1,1,3),plot(z,q,'*r-',z,w,'b<-'),title('grafi'),xlabel('val Q'),ylabel('val W'),grid

Error using subplot (line 109)

Index exceeds number of subplots.


>> subplot(2,1,3),plot(z,q,'*r-',z,w,'b<-'),title('grafi'),xlabel('val Q'),ylabel('val W'),grid

Error using subplot (line 109)

Index exceeds number of subplots.

>> subplot(1,2,2),plot(z,q,'*r-',z,w,'b<-'),title('grafi'),xlabel('val Q'),ylabel('val W'),grid

>> subplot(2,2,4),plot(z,q,'*r-',z,w,'b<-'),title('grafi'),xlabel('val Q'),ylabel('val W'),grid

>> subplot(2,2,4),plot(z,q,'*r-',z,w,'b<-'),title('grafi'),xlabel('val Q'),ylabel('val W'),grid

subplot(2,2,2),plot(z,q,'*r-',z,w,'b<-'),title('grafi'),xlabel('val Q'),ylabel('val W'),grid=parar


encuadrar.

Explot= grafica cualquier funcion

You might also like