Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

John Paulo A. Archinue C.A.E Bsme 3B

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

John Paulo A.

Archinue
%Problem 1
x1=[-4:0.1:4];
fx1=0.6.*x1.^5 -5.*x1.^3 +9.*x1 +2;
plot(x1,fx1,'b')
x2=[-2.7:0.1:2.7];
fx2=0.6.*x2.^5 -5.*x2.^3 +9.*x2 +2;
plot(x2,fx2,'r')

C.A.E

BSME 3B

John Paulo A. Archinue

C.A.E

%Problem 2
x=[-10:0.1:10];
fx=(x.^2-x+1)./(x.^2+x+1);
plot(x,fx)

%Problem 3
fx=@(x) (0.01*x^5 - 0.03*x^4 + 0.4*x^3 - 2*x^2 - 6*x +5)
fplot(fx,[-4,6])

BSME 3B

John Paulo A. Archinue


%Problem 4
x1=[-10:0.1:3.7];
y1= (1.5.*x1) ./ (x1-4);
plot(x1,y1);
x2=[4.3:0.1:10];
y2= (1.5.*x2) ./ (x2-4)
plot(x1,y1,'b',x2,y2,'r')

%Problem 5

C.A.E

BSME 3B

John Paulo A. Archinue

C.A.E

x1=[-10:0.1:-1.1];
x2=[-0.9:0.1:2.9];
x3=[3.1:0.1:10];
y1=(x1.^2-5.*x1+10)./(x1.^2-2.*x1-3);
y2=(x2.^2-5.*x2+10)./(x2.^2-2.*x2-3);
y3=(x3.^2-5.*x3+10)./(x3.^2-2.*x3-3);
plot(x1,y1,'b',x2,y2,'g',x3,y3,'r')

%Problem 6

BSME 3B

John Paulo A. Archinue


x=[-2*pi:0.1:2*pi];
fx=3.*x.*sin(x)-2.*x;
dfx=3.*x.*cos(x)+3.*sin(x)-2;
plot(x,fx,'r',x,dfx,'--')
xlabel('x')
ylabel('y')

%Problem 7
vs=12
rs=2.5
RL=[1:0.1:10];
P= vs^2.*RL./(RL+rs).^2;
plot(P,RL)

%Problem 8

C.A.E

BSME 3B

John Paulo A. Archinue


dix=-25
t=[0:0.1:4]
diy=14
v1=-8
v2=16
d1=v1.*t + diy
d2=v2.*t + dix
plot(t,d1,'b',t,d2,'r--')

%Problem 9

C.A.E

BSME 3B

John Paulo A. Archinue


P=5000;
ma=1;
mq=4;
r=0.075;
t=[1:15];
Va=P*(1+ r/ma)^ma.*t;
Vq=P*(1+ r/mq)^mq.*t;
Vc=P*exp(r.*t);
plot(t,Va,'b',t,Vq,'r--',t,Vc,'g:')

%Problem 12

C.A.E

BSME 3B

John Paulo A. Archinue


xt=@(t) (0.4*t^3-2*t^2-5*t+13);
vt=@(t) (1.2*t^2-4*t-5);
at=@(t) (2.4*t-4);
subplot(2,2,1)
fplot(xt,[0,7])
subplot(2,2,2)
fplot(vt,[0,7])
subplot(2,2,3)
fplot(at,[0,7])

C.A.E

BSME 3B

You might also like