How do you plot a function?

1 visualización (últimos 30 días)
Jesus Martinez Sanchez
Jesus Martinez Sanchez el 17 de Sept. de 2021
Editada: Hernia Baby el 18 de Sept. de 2021
How would you plot x(t)=[12+7sin(t-(1/3*pi)]*cos(13pit)

Respuestas (2)

Hernia Baby
Hernia Baby el 17 de Sept. de 2021
Editada: Hernia Baby el 18 de Sept. de 2021
If you have symbolic math toolbox, you can use fplot.
syms t;
x = (12 + 7*sin(pi*t - (1/3)*pi) )*cos(13*pi*t)
x = 
fplot(t,x)

Image Analyst
Image Analyst el 17 de Sept. de 2021
Try this:
t = linspace(-pi, pi, 1000);
xt = (12 + 7 * sin(pi * t - (1/3 * pi))) .* cos(13 * pi * t);
plot(t, xt, 'b-', 'LineWidth', 2);
grid on;
xlabel('t', 'FontSize', 20);
ylabel('x(t)', 'FontSize', 20);

Categorías

Más información sobre Line Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by