You are on page 1of 3

PROBLEMA N1.>> t=0:0.

1:2*pi;
>> x=2*cos(t);
>> y=2*sin(t);

>> plot(x,y)

>> xlabel('eje x')

>> ylabel('eje y')

>> hold on
eje y

>> x=-8:0.01:8;

1
0

>> y=((x-0.5)*(-1.9364)/(7.5))+(1.9364); -1
>> plot(x,y,r)

-2

>> hold on

-3

>> x=-8:0.01:8;

-4

>> y=((x-0.5)*(1.9364)/(7.5))-(1.9364);

-5
-8

-6

-4

-2

>> plot(x,y, g)

0
eje x

PROBLEMA N2.>> % Grafica del corazon


>> t = 0: 0.01: 2 / 3 * pi;

2
1

>> x = 2 * cos(t) + 1.0;


>> y = 2 * sin(t);
>> plot(x, y, g)

0
-1

>> hold on

-2

>> t = pi / 3 : 0.01 : pi;

-3

>> x = 2 * cos(t) - 1.0;

-4

>> y = 2 * sin(t);
>> plot(x, y, r)
>> hold on

-5
-6
-3

-2

-1

>> x=0:0.001:3;
>> y=2*x-6;
>> plot(x,y, y)
>> hold on
>> x = -3: 0.001: 0;
>> y = -2 * x - 6;
>> plot(x,y)

PROBLEMA N3.>> t=0:0.01:2*pi;


>> x=1*cos(t);
>> y=1*sin(t);

>> plot(x,y)
>> axis([-5,5,-5,5])
>> t=0:0.01:1*pi;

>> x=2*cos(t);
>> y=3+2*-sin(t);
>> plot(x,y)

>> hold on
>> t=0:0.01:2*pi;

>> y=1*sin(t);
>> x=1*cos(t);
>> plot(x,y)

-1

>> hold on
>> t=0:0.01:1*pi;
>> x=2*cos(t);

-2

>> y=-3+2*sin(t);
>> plot(x,y)
>> grid
>> axis('square')

-3
-2

-1

PROBLEMA N4.>>x=[-5:0.01:5];
>> y=4-x;
>> figure(5)
>> plot(x,y)
>> hold on
>> x=[-5:0.01:5];
>> y=2*x-2;
>> plot(x,y,'g')

You might also like