Tarea de Matlab: Alumno: Quispe Guevara Luis Felipe Profesor: Segundo Gamarra Quispe

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 20

TAREA DE MATLAB

ALUMNO: QUISPE GUEVARA LUIS FELIPE


PROFESOR: SEGUNDO GAMARRA QUISPE

PROBLEMAS:

]
clc
clear
close all
x=linspace(-3,3,30);
ds=sqrt(1-x).*(x<-1)+(1-x.^2).*(-1<x & x<1)+sqrt(x-1).*(x>1);
plot(x,ds,'r','linewidth',8)
2

1.8

1.6

1.4

1.2

0.8

0.6

0.4

0.2

0
-3 -2 -1 0 1 2 3

clc
clear
close all
x=linspace(-3,3,50);
ds=(-x).*(x<-1)+1.*(0<x & x<2)+(-x.^2).*(x>2);
plot(x,ds,'y','linewidth',4);
4

-2

-4

-6

-8

-10
-3 -2 -1 0 1 2 3

clc
clear
close all
b=linspace(-pi,pi,100);
r=3-6*(sin(b));

polar(b,r)
90
1
120 60
0.8

0.6
150 30
0.4

0.2

180 0

210 330

240 300
270

clc
clear
close all
b=linspace(-pi,pi,100);
r=(sin(6*b));

polar(b,r)
90
1
120 60
0.8

0.6
150 30
0.4

0.2

180 0

210 330

240 300
270

clc
clear
close all
x=linspace(-pi,pi,100);
r=cos(8*x);
polar(x,r)
90
1
120 60
0.8

0.6
150 30
0.4

0.2

180 0

210 330

240 300
270

clc
clear
close all
x=linspace(-pi,pi,100);
r=sqrt(5*cos(2*x));
polar(x,r)
90
2.5
120 60
2

1.5
150 30
1

0.5

180 0

210 330

240 300
270

clc
clear
close all
t=linspace(-pi,pi,30);
x=2*cos(t).^3;
y=2*sin(t).^3;
dx=diff(x);
dxx=[dx dx(end)];
dy=diff(y);
dyy=[dy dy(end)];
quiver(x, y, dxx, dyy)
grid on
2.5

1.5

0.5

-0.5

-1

-1.5

-2

-2.5
-2.5 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 2.5

clc
clear
close all
t=linspace(-pi,pi,30);
x=3*sin(t);
dx=diff(x);
dxx=[dx dx(end)];
y=2*sin(2*t);
dy=diff(y);
dyy=[dy dy(end)];
quiver(x,y,dxx,dyy)
grid on
2.5

1.5

0.5

-0.5

-1

-1.5

-2

-2.5
-4 -3 -2 -1 0 1 2 3 4

clc
clear
close all
t=linspace(-3,3,40);
h=(t/pi);
x=((h).*(12*(h.^2)-9));
y=(((h.^2)-1).*16.*(h.^2)+2);
dx=diff(x);
dy=diff(y);
dxx=[dx dx(end)];
dyy=[dy dy(end)];

quiver(x,y,dxx,dyy)
grid on
2.5

1.5

0.5

-0.5

-1

-1.5

-2
-4 -3 -2 -1 0 1 2 3 4

clc
clear
close all
t=linspace(-pi,pi,40);
x=(1.5*cos(t).*(cos(t)+1));
y=2*(sin(2*t));
dx=diff(x);
dy=diff(y);
dxx=[dx dx(end)];
dyy=[dy dy(end)];
quiver(x,y,dxx,dyy)
grid on
2.5

1.5

0.5

-0.5

-1

-1.5

-2

-2.5
-0.5 0 0.5 1 1.5 2 2.5 3 3.5

clc
clear
close all
t=linspace(-pi,pi,40);
x=sin(2*t)+sin(t);
y=-cos(2*t)-cos(t);
dx=diff(x);
dy=diff(y);
dxx=[dx dx(end)];
dyy=[dy dy(end)];
quiver(x,y,dxx,dyy)
grid on
1.5

0.5

-0.5

-1

-1.5

-2

-2.5
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2

clc
clear
close all
t=linspace(-pi,pi,40);
x=(exp(t/4).*sin(2*t));
y=(exp(t/4).*cos(2*t));

dx=diff(x);
dy=diff(y);
dxx=[dx dx(end)];
dyy=[dy dy(end)];
quiver(x,y,dxx,dyy)
grid on
2.5

1.5

0.5

-0.5

-1

-1.5

-2
-2 -1.5 -1 -0.5 0 0.5 1 1.5

clc
clear
close all
t=linspace(-10,4.8,1000);
plot3(exp(t/4).*sin(2*t),exp(t/4).*cos(2*t),t/4,'r','linewidt
h',4)
grid on
2

-1

-2

-3
4
2 3
2
0 1
-2 0
-1
-4 -2

clc
clear
close all
t=linspace(-9,10,1000);
plot3(sin(2*t)+ sin(t),-cos(2*t)-
cos(t),t/6,'r','linewidth',4)
grid on
2

-1

-2
2
1 2
0 1
0
-1 -1
-2 -2

clc
clear
close all
t=linspace(-pi,pi,100);
plot3(cos(3*t),2*cos(t).^2,sin(2*t),'b','linewidth',4)
grid on
1

0.5

-0.5

-1
2
1.5 1
1 0.5
0
0.5 -0.5
0 -1

clc
clear
close all
[x y]=meshgrid(-5:0.5:5,-4:0.5:4);
z=-1*(sqrt(abs(x.*y)));
surf(x,y,z)
colorbar
0

-0.5
0
-1
-1
-1.5
-2
-2
-3
-2.5
-4
-3
-5
4 -3.5
2 5
0 -4
0
-2
-4 -5

clc
clear
close all
[x y]=meshgrid(-5:0.5:5,-4:0.5:4);
z=(cos((x.^2+y.^2)/4)./(3+x.^2+y.^2));
surf(x,y,z)
colorbar
0.3

0.4
0.25

0.3
0.2
0.2
0.15
0.1
0.1
0

0.05
-0.1
4
2 5 0
0
0 -0.05
-2
-4 -5

clc
clear
close all
[x y]=meshgrid(-5:0.5:5,-4:0.5:4);
z=y.^2/5-3*abs(x);
surf(x,y,z);
colorbar
2

5 0

-2
0
-4
-5
-6

-10 -8

-15 -10
4
2 5 -12
0
0 -14
-2
-4 -5

clc
clear
close all
[x y]=meshgrid(-5:0.5:5,-4:0.5:4);
z=exp(-1*(x.^2+y.^2));
surf(x,y,z);
colorbar
1

0.9

1 0.8

0.8 0.7

0.6 0.6

0.4 0.5

0.4
0.2
0.3
0
4 0.2
2 5
0 0.1
0
-2
-4 -5

You might also like