You are on page 1of 4

# x=0:100;

y=(6*x.^2);
z=8*cos(2*pi*x);
c=conv(y,z);
stem(x,c(1:length(x)),'filled');

x=0:.1:4*pi;
hold on;
y1 = sin(x);
y2 = cos(x);
p1 = plot(x,y1);
p2 = plot(x,y2);
set(p1,'color','red','LineWidth',2)
set(p2,'color','blue','LineWidth',1)
ylabel('Y');
xlabel('X');
title('grafico seno y coseno');
legend,stem('sin','cos');
hold off;

figure;
x = 0:.1:4*pi;

y1 = sin(x);
y2 = cos(x);
y3 = 2*cos(x);

hold on;

plot(x,y1);
plot(x,y2);

hold off;

figure;
plot(x,y3);

BIEN
x=0:.1:4*pi;
hold on;
y1 = sin(x);
y2 = cos(x);
p1 = stem(x,y1);
p2 = stem(x,y2);
set(p1,'color','red','LineWidth',2)
set(p2,'color','blac','LineWidth',1)
%ylabel('Y');
%xlabel('X');
%title('grafico seno y coseno');
%legend('sin','cos');
hold off;
bien
x=0:60;
y=(6*x.^2);
z=8*cos(2*pi*x);
c=conv(y,z);
p1=stem(x,c(1:length(x)),'filled');
set(p1,'color','red','LineWidth',2)
ylabel('Y');
xlabel('X');
title('grafico funcion no periodica');

x=0:60;
y=(2*x.^2);
z=8*cos(2*pi*x);
c=conv(y,z);
p1=stem(x,c(1:length(x)),'filled');
set(p1,'color','red','LineWidth',2)
ylabel('Y');
xlabel('X');
title('grafico funcion no periodica');
clear all
figure(1)
figure(gcf)
syms x
y1=2;
y2=x+1;
figure(gcf)
plot([-5 5],[ 2 2],[-5 5],[-5 5]+1)
hold on
X=solve(y1==y2);
plot(X,2,'*r')
hold off
__________________________
clear all
figure(2)
figure(gcf)
syms x
y1=exp(x)-20;
fplot(char(y1),[3.5 4.5],'r')
hold on
y2=5*x+5;
fplot(char(y2),[3.5 4.5],'b')
x=fzero(char(y1-y2),[3.5 4.5]);
F=inline(char(y2),'x');
plot(x,F(x),'*m')
hold off