what is the appropriate time range that should be given to a Sinusoidal loading vs time? How many cycles within a specified time range?

what is the appropriate time range that should be given to a Sinusoidal loading vs time? How do you modify number of cycles within a time range in Matlab? I want to be able to plot p(t)=2.25*sin(2*pi*fs*t) to look like this but I do not know what time range I should give so that the plot looks like the one on the image provided. I also want to know what is the adequate number of cycles and how can I modify code to have less or more cycles within a time range. I am still confused with these sine waves.

 Respuesta aceptada

Here is a simple solution
p0 = 2.25;
fs = 10.37;
t = 0:0.01:4.5*pi;
y = p0*sind(2*pi*fs*t);
f = figure;
ax = axes('Parent',f);
plot(ax, t,y); grid(ax,'on');

3 comentarios

Hi again.. Being more correct: I have fixed the code: using "sin" and not "sind"
Regarding timing: If you fs = 10.37HZ = ~ 10 cycles in 1 second (1/10.37 =~ 0.0964 and not,as seen on the attached picture : 0.00929)
Timing tunning: If we want 3.25 cycles to be shown: multiply 1/fs with 3.25 (see example below+ graph)
p0 = 2.25;
fs = 10.37;
t = 0:0.001:3.25*1/fs;
y = p0*sin(2*pi*fs*t);
f = figure;
ax = axes('Parent',f);
plot(ax, t,y); grid(ax,'on');
Thank you very much for your clear, concise and simple explanation. I always had problems understanding amplitudes, cycles, and trigonometry. Very well explained.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Graphics Object Properties en Centro de ayuda y File Exchange.

Productos

Preguntada:

el 24 de Jun. de 2024

Comentada:

el 24 de Jun. de 2024

Community Treasure Hunt

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

Start Hunting!

Translated by