You are on page 1of 4

MATLAB Command Window Page 1

>> %Graficas
>> %Juan Pablo Zevallos
>> date

ans =

'20-Jul-2021'

>> x=[1:10]

x =

1 2 3 4 5 6 7 8 9 10

>> y=[0.5 1 5.5 7 12 15 17 18]

y =

0.5000 1.0000 5.5000 7.0000 12.0000 15.0000 17.0000 18.0000

>> y=[0.5 1 5.5 7 12 15 17 18 25 30]

y =

0.5000 1.0000 5.5000 7.0000 12.0000 15.0000 17.0000 18.0000


25.0000 30.0000

>> plot(x,y)

>> title('Practica 1 con plot')


>>
>> xlabel('Eje x'),ylabel('Eje y')
>> grin on
Undefined function or variable 'grin'.

Did you mean:


>> grid on
>> X= o:pi/100:2*pi;
Undefined function or variable 'o'.

>> X= 0:pi/100:2*pi;
>> Y=cos(X)*2;
>> Y2=cos(X)*3;
>> Y3=cos(X)*4;
>> Y4=cos(X)*5;
>> figure(2)
>> plot(X,Y,X,Y2,X,Y3,X,Y4)
Warning: Error occurred while executing the listener callback for event WindowMousePress
defined for class
matlab.ui.Figure:
Invalid or deleted object.
MATLAB Command Window Page 2

Error in matlab.graphics.illustration.Legend/enableAxesDirtyListeners

Error in matlab.graphics.shape.internal.AxesLayoutManager/enableAxesDirtyListeners

Error in matlab.graphics.interaction.internal.toggleAxesLayoutManager

Error in matlab.graphics.interaction.uiaxes.PanBase/start

Error in matlab.graphics.interaction.uiaxes.Drag/start_drag

Error in matlab.graphics.interaction.uiaxes.Drag/validate_drag

Error in matlab.graphics.interaction.uiaxes.Drag>@(varargin)hObj.validate_drag(varargin
{:})
>> y=[5 6 10 12 14 15 27 33 35 55]

y =

5 6 10 12 14 15 27 33 35 55

>> figura(3)
Undefined function or variable 'figura'.

Did you mean:


>> figure(3)
>> plot(x,y,'--*g',x,y*2,':+r',x,y/2,'-om')
>>
>> figure(4)
>> subplot(3,1,1)
>> x=0:pi/20:2*pi:
x=0:pi/20:2*pi:

Error: Invalid expression. Check for missing or extra characters.

>> x=0:pi/20:2*pi;
>> plot(x,sin(x))
>> subplot(3,1,2)
>> plot(x,sin(2*x))
>> subplot(3,1,2)
>> subplot(3,1,3)
>> y

y =

5 6 10 12 14 15 27 33 35 55

>> x

x =
MATLAB Command Window Page 3

Columns 1 through 12

0 0.1571 0.3142 0.4712 0.6283 0.7854 0.9425 1.0996


1.2566 1.4137 1.5708 1.7279

Columns 13 through 24

1.8850 2.0420 2.1991 2.3562 2.5133 2.6704 2.8274 2.9845


3.1416 3.2987 3.4558 3.6128

Columns 25 through 36

3.7699 3.9270 4.0841 4.2412 4.3982 4.5553 4.7124 4.8695


5.0265 5.1836 5.3407 5.4978

Columns 37 through 41

5.6549 5.8119 5.9690 6.1261 6.2832

>> x=1:10

x =

1 2 3 4 5 6 7 8 9 10

>> loglog(x,y)
>> figura(5)
Undefined function or variable 'figura'.

Did you mean:


>> figure(5)
>> subplot(2,2,1)
>> semilogx(x,y)
>> subplot(2,2,2)
>> plot(x,y)
>> subplot(2,2,3)
>> semilogy(x,y)
>> x1=0:pi/100:pi;
>> subplot(2,2,4)
>> y1=sin(x1);
>> polar(x1,y1)
>> figura(6)
Undefined function or variable 'figura'.

Did you mean:


>> figure(6)
>> subplot(1,2,1)
>> x=0:pi/20:2*pi;
>> y1=sin(x)

y1 =
MATLAB Command Window Page 4

Columns 1 through 12

0 0.1564 0.3090 0.4540 0.5878 0.7071 0.8090 0.8910


0.9511 0.9877 1.0000 0.9877

Columns 13 through 24

0.9511 0.8910 0.8090 0.7071 0.5878 0.4540 0.3090 0.1564


0.0000 -0.1564 -0.3090 -0.4540

Columns 25 through 36

-0.5878 -0.7071 -0.8090 -0.8910 -0.9511 -0.9877 -1.0000 -0.9877


-0.9511 -0.8910 -0.8090 -0.7071

Columns 37 through 41

-0.5878 -0.4540 -0.3090 -0.1564 -0.0000

>> y1=sin(x);
>> y2=exp(x);
>> plot(x,y1,x,y2)
>> subplot(1,2,2)
>> plotyy(x,y1,x,y2)
>>

You might also like