Deber Progra 3 Er Parcial
Deber Progra 3 Er Parcial
CHIMBORAZO
NOMBRE: SANTIAGO PERALTA
CODIGO: 2250
%problema 2
clear,clc
x=[-1:0.25:5]
y=(x.^2-3*x+7)./sqrt(2*x+5)
plot(x,y)
%problema 4
clc, clear
x=[-4:0.5:4]
y=(3.*cosd(x)-sind(x)).*(exp(-0.2.*x))
plot(x,y,'b','linewidth',5)
grid on
xlabel('eje x')
ylabel('eje y')
title('función')
title('función','FontSize', 28)
xlabel('eje x','FontSize', 20)
ylabel('eje y','FontSize', 22)
axis([0 12 0 12])
%problema 6
clear,clc
x=[-4:0.01:4]
y=(x.^2)./(2+sind(x)+x.^4)
plot(x,y)
%problema 8
clc, clear
x=[-2:1:4]
y= (x.^3)-(2*x.^2)-(10*(sind(x)).^2)-(exp(0.9*x))
plot(x,y,'-m','linewidth',2)
hold on
grid on
u=(3*x.^2)-(4*x)-(20*cosd(x).*(sind(x))-(0.9*exp(0.9*x)))
plot(x,u,'--g')
xlabel('eje x')
ylabel('eje y')
title('función')
title('función','FontSize', 28)
xlabel('eje x','FontSize', 20)
ylabel('eje y','FontSize', 22)
hold off
%problema 10
clear,clc
subplot(2,1,1)
x=[-4:0.25:3]
y=-3*x.^4+10*x.^2-3
plot(x,y,'b--')
subplot(2,1,2)
x1=[-4:0.1:4]
y1=-3*x1.^4+10*x1.^2-3
plot(x1,y1,'ro')
%problema 12
clc, clear
fplot(@(x)((sin(2*x))+((cos(5*x)).^2)).*(exp(-0.2*x)),[-6 6])
grid on
%problema 14
clear,clc
hold on
x=[0:5:360]
y=((sind(x)).^2).*cosd(2*x)
plot(x,y,'-')
y1=(sind(2*x).*cosd(2*x))-2*(sind(2*x).*(sind(x)).^2)
plot(x,y1,'--')
xlabel('eje x')
ylabel('eje y')
legend('1^e^r funcion f(x)','2^d^o derivada de f(x)')
hold off
%Problema 16
clc, clear
viscircles([4.2 2.7],7.5)
%problema 18
clear, clc
hold on
t=[-pi:0.1:pi]
x=sin(t).*cos(t)
plot(t,x)
y=1.5.*cos(t)
plot(t,y)
axis([-2 2 -1.5 1.5])
hold off
%problema 20
clc, clear
t=[0: 2*pi]
x=(cos(t)).^3
y=(sin(t)).^3
u=(sin(t))
v=(cos(t))
plot(y,x,'-m','linewidth',1)
hold on
plot (v,u,'--k','linewidth',0.5)
grid on
xlabel('eje x')
ylabel('eje y')
title('función')
title('función','FontSize', 18)
xlabel('eje x','FontSize', 10)
ylabel('eje y','FontSize', 10)
axis([-2 2 -1.5 1.5])
hold off
%problema 22
clear, clc
hold on
x1=[-1:0.1:2.9]
y1=(x1.^2-5*x1-12)./(x1.^2-x1-6)
plot(x1,y1)
x2=[3.1:0.1:7]
y2=(x2.^2-5*x2-12)./(x2.^2-x2-6)
plot(x2,y2)
axis([-1 7 -20 20])
hold off
%problema 24
clc, clear
hold on
x1=[-4:0.5:-2]
y1=(x1.^2+3*x1-5)./(x1.^2-3*x1-10)
plot(x1,y1)
x2=[2:0.5:5]
y2=(x2.^2+3*x2-5)./(x2.^2-3*x2-10)
plot(x2,y2)
x3=[5:0.5:9]
y3=(x3.^2+3*x3-5)./(x3.^2-3*x3-10)
plot(x3,y3)
axis([-4.5 10 -20 20])
grid on
hold off
%problema 26
clear, clc
hold on
t1=[-30:0.5:-1.6]
x=(3*t1)./(1+t1.^3)
plot(t1,x)
t=[-0.6:0.1:40]
y=(3*t.^2)./(1+t.^3)
plot(t,y)
hold off
%problema 28
clc, clear
t=[0:0.01: 4*pi]
x=13*cos(t)-2*cos(6.5*t)
y=13*sin(t)-2*sin(6.5*t)
plot(t,x,'--b',t,y,'--r')
grid on
%problema 30
clear, clc
t=[-4:0.01:3]
x=(3.3-0.4*t.^2).*sin(t)
y=(2.5-0.3*t.^2).*cos(t)
plot(t,x,'b--',t,y,'b--')
%problema 32
clc, clear
theta=linspace(0,2*pi)
r=2*sind(3.*theta)
polar(theta, r)
%problema 34
a=10,b=4,h=2,k=3;
t=[-pi:0.1:pi]
x=h+a*sin(t)
y=k+b*cos(t)
plot(x,y)
%problema 36
Eo=0.885*10^-12,Q=9.4*10^-6,q=2.4*10^-5,R=0.1;
Z=[0:0.001:0.3]
F=(Q*q*Z/2*Eo).*(1-(Z./(Z.^2+R^2).^0.5))
plot(Z,F)
%BUSCAR EL PUNTO MAS ALTO CON UN COMANDO
%problema 38
clc, clear
t=[0: 20]
r=25+30*[1-(exp(sin(0.07*t)))]
theta=2*pi*(1-(exp(-0.2*t)))
plot(t, r,’—b’,t, theta,’y’)
grid on
%problema 40
syms t
r=25+(30*(1-exp(sin(0.07*t))))
vr=diff (r)
teta=2*pi*(1-exp(-0.2*t))
vd=diff (teta)
vt=r*vd
V=sqrt(vr.^2+vt.^2)
ezplot(V,[0:0.5:20])