0% found this document useful (0 votes)
29 views4 pages

'Filled': %ylabel ('Y') %xlabel ('X') %title ('Grafico Seno y Coseno') %legend ('Sin','cos')

The document contains code for plotting various functions including sine, cosine, and their convolution. It generates multiple figures plotting sine and cosine with varying properties like color and line width. It also contains code for plotting a non-periodic function by convolving a quadratic and cosine function. The code clears variables, generates figures, and plots lines and their intersection point by solving equations symbolically.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
29 views4 pages

'Filled': %ylabel ('Y') %xlabel ('X') %title ('Grafico Seno y Coseno') %legend ('Sin','cos')

The document contains code for plotting various functions including sine, cosine, and their convolution. It generates multiple figures plotting sine and cosine with varying properties like color and line width. It also contains code for plotting a non-periodic function by convolving a quadratic and cosine function. The code clears variables, generates figures, and plots lines and their intersection point by solving equations symbolically.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 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

You might also like