Make an implicit function in matlab?

3 ビュー (過去 30 日間)
David Sjöberg
David Sjöberg 2017 年 5 月 15 日
編集済み: Torsten 2017 年 5 月 15 日
I need matlab to create a function for me. I have,
y=e*h*sqrt(4ah+(1-e)*a*h)+(1-e*h)*sqrt((1-e)*2*h) in the interval 0<=e<=1 and 0<=h<=1.
I need a function of max y as a function of h (i.e. e is implicit). How can can matlab create this?
Thanks!

回答 (1 件)

Torsten
Torsten 2017 年 5 月 15 日
Use "fminbnd" to search for the minimum of the function
f=@(x)-(x*h*sqrt(4a*h+(1-x)*a*h)+(1-x*h)*sqrt((1-x)*2*h))
in the interval [0:1]
Best wishes
Torsten.
  4 件のコメント
David Sjöberg
David Sjöberg 2017 年 5 月 15 日
Thanks again. I get "undefined variable h". But I still get the same error of conversion if I define h as a variable. Sorry for being slow to understand.
Torsten
Torsten 2017 年 5 月 15 日
I modified the code from above.
Best wishes
Torsten.

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

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by