fzero function troubles/errors

1 回表示 (過去 30 日間)
Bob
Bob 2015 年 1 月 31 日
回答済み: Mischa Kim 2015 年 1 月 31 日
question is Use fzero to find the largest x-value where ex+1 meets cos(5x). Use a nearby sensible integer value of your choice.
Code that I have: fzero('exp^(x+1)==cos(5*x)',10)
error: Error using fzero (line 289) FZERO cannot continue because user-supplied expression ==> exp^(x+1)==cos(5*x) failed with the error below.
Error in inline expression ==> exp^(x+1)==cos(5*x)
Not enough input arguments.
Error in project1 (line 31) p16=fzero('exp^(x+1)==cos(5*x)',10)

採用された回答

Mischa Kim
Mischa Kim 2015 年 1 月 31 日
Bradley, use
sol = fzero(@(x) exp(x+1)-cos(5*x),10)
sol =
-26.075219024797857

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeChemistry についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by