Finding max amplitude from cosine

1 回表示 (過去 30 日間)
MC
MC 2019 年 10 月 20 日
コメント済み: Rena Berman 2019 年 10 月 28 日
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 件のコメント
Rik
Rik 2019 年 10 月 22 日
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 2019 年 10 月 28 日
(Answers Dev) Restored edit

サインインしてコメントする。

回答 (1 件)

Daniel M
Daniel M 2019 年 10 月 21 日
編集済み: Daniel M 2019 年 10 月 21 日
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.

カテゴリ

Help Center および File ExchangeLoops and Conditional Statements についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by