How to plot that?

1 visualización (últimos 30 días)
RoBoTBoY
RoBoTBoY el 9 de Nov. de 2020
Editada: RoBoTBoY el 9 de Nov. de 2020
Hello! How to plot that?
  1 comentario
Mohamad
Mohamad el 9 de Nov. de 2020
Hi , you must mention the following :
f : sinusoid frequency .
alpha : Attenuation .
A
Phi : phase shift

Iniciar sesión para comentar.

Respuesta aceptada

David Hill
David Hill el 9 de Nov. de 2020
phi=.1;%not sure what you what
alpha=2*log(10);
f=4;
A=1;
t=0:.001:1;
f=@(t)A*exp(-alpha*t).*cos(2*pi*f*t+phi);
plot(t,f(t));
  1 comentario
RoBoTBoY
RoBoTBoY el 9 de Nov. de 2020
Editada: RoBoTBoY el 9 de Nov. de 2020
I put pi/2 where phi.
What does @(t) mean?

Iniciar sesión para comentar.

Más respuestas (1)

KSSV
KSSV el 9 de Nov. de 2020
A=10;
f=1000;
n=5;
T=1/f;
t=[0:T/100:n*T];
s=A*exp(-t*1000).*sin(2*pi*f*t);

Categorías

Más información sobre Log 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