for example, if I had:
G1=(1:1:10)*0.181881788
G2=(1:1:10)*1.281888281
and I need to find where
sum(G1*sin(G2*x))=0
I tried
x=(fsolve(@(x)sum(G1*sin(G2*x)),cc))
where cc=(1:1:5)
but it doesn't work.
thanks

1 件のコメント

Walter Roberson
Walter Roberson 2013 年 10 月 6 日
What happens instead of it working ?

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

 採用された回答

Walter Roberson
Walter Roberson 2013 年 10 月 6 日

0 投票

As G1 and G2 and x are vectors, you probably want G1 .* sin(G2 .* x)
otherwise it is going to try to do matrix multiplication and likely fail.

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeEntering Commands についてさらに検索

タグ

質問済み:

2013 年 10 月 6 日

回答済み:

2013 年 10 月 6 日

Community Treasure Hunt

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

Start Hunting!

Translated by