Jhamir Matlab
Jhamir Matlab
clc
clear
x=[-4:0.01:7];
y1=x.^2;
y2=8-x.^2;
y3=4*x+12;
plot(x,y1,'r','linewidth',2)
hold on
plot(x,y2,'k','linewidth',2)
plot(x,y3,'g','linewidth',2)
grid on
hold off
50
40
30
20
10
-10
-20
-30
-40
-50
-4 -2 0 2 4 6 8
PREGUNTA N 2
clc
clear
x=[0:0.01:500];
y=exp(-x/100).*sin(x/2);
plot(x,y,'r','linewidth',2)
grid on
0.8
0.6
0.4
0.2
-0.2
-0.4
-0.6
-0.8
-1
0 50 100 150 200 250 300 350 400 450 500
PREGUNTA N 2
clc
clear
x=[-2:0.01:2];
y=4-x.^2;
x1=[2.01:0.01:6];
y1=x1.^2-4;
plot(x,y,'m','linewidth',2)
hold on
plot(x1,y1,'b','linewidth',2)
grid on
hold off
axis([-3 7 -5 40])
40
35
30
25
20
15
10
-5
-3 -2 -1 0 1 2 3 4 5 6 7