Finding max amplitude from cosine

2 visualizaciones (últimos 30 días)
MC
MC el 20 de Oct. de 2019
Comentada: Rena Berman el 28 de Oct. de 2019
I want to Experiment with diferent values for the forcing frequency w in F(t) = cos(wt).
My goal is to fing the maximum range of values such that the maximum amplitude |y(t)> 1.
w1=0;
w2=0;
max =[w1,w2];
for w = -1:0.1:1
t=0:1:100;
f = cos(w.*t);
if f>=1
max= w1;
end
if max>w1
max= w2;
end
end
  2 comentarios
Rik
Rik el 22 de Oct. de 2019
It is considered rude to edit away your question. It removes the possibility for others to learn from your question (and the answer). You are getting free help from strangers on the internet, the least you can do is leave your question so other can benefit from it as well.
Rena Berman
Rena Berman el 28 de Oct. de 2019
(Answers Dev) Restored edit

Iniciar sesión para comentar.

Respuestas (1)

Daniel M
Daniel M el 21 de Oct. de 2019
Editada: Daniel M el 21 de Oct. de 2019
The maximum amplitude of F(t) = A*cos(w*t) where A = 1, will always be 1, for all values of w. This doesn't require use of MATLAB at all, it is trivial to solve analytically.

Categorías

Más información sobre Loops and Conditional Statements en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by