2 input and one out in plot
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
iman
el 24 de Dic. de 2013
Editada: Image Analyst
el 24 de Dic. de 2013

in this image in example of spectrum analysis of sinusidal signals i want input plot 1 and plot 2 and i want that matlab Draw plot 3 Diagram . what commands can do this problem ? please help man tankyou
meanwhile 1 plot is cos(pi/3n)+0.75cos(2pi/3n) and 2 plot is rectangular window
0 comentarios
Respuesta aceptada
Image Analyst
el 24 de Dic. de 2013
It looks like the stem() function will create that kind of plot.
2 comentarios
Image Analyst
el 24 de Dic. de 2013
Editada: Image Analyst
el 24 de Dic. de 2013
Did you look at any of the 13 examples from the help? Well, here, I did it for you:
% Create data.
x = -3:11;
y1 = cos(x .* pi/3)+0.75*cos(2*x*pi/3);
y2 = [0,0,0,1,1,1,1,1,1,1,1,0,0,0,0]
y3 = y1 .* y2;
% Plot top graph.
subplot(3,1,1);
stem(x,y1, 'Color', 'k', 'MarkerFaceColor', 'k', 'LineWidth', 3);
xlim([-3,11]);
ylim([-2,2]);
grid on;
% Enlarge figure to full screen.
set(gcf, 'Units', 'Normalized', 'OuterPosition', [0 0 1 1]);
% Plot top graph.
subplot(3,1,2);
stem(x,y2, 'Color', 'k', 'MarkerFaceColor', 'k', 'LineWidth', 3);
xlim([-3,11]);
ylim([0, 1.2]);
grid on;
% Plot top graph.
subplot(3,1,3);
stem(x,y3, 'Color', 'k', 'MarkerFaceColor', 'k', 'LineWidth', 3);
xlim([-3,11]);
ylim([-2, 2]);
grid on;
Más respuestas (0)
Ver también
Categorías
Más información sobre Annotations en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!