minimum of two functions

Hi all, I need to find minimum of two functions for instance f1(x) = x+1, f2(x)= x+2 , min{f1, f2} = f1. It may not happen in general, actually I want which function is greater on which intervalon [0, infty): f1(x) = x^2, f2(x)=x+1 , min{f1, f2} = f2 on [0,1] , f1 on [1, infty). Thanx in advance. d.

 採用された回答

Daniel Shub
Daniel Shub 2012 年 3 月 25 日

0 投票

At this point I don't think you have a MATLAB question ...
The possible boundary edges are when f1-f2 is zero (you can find these with solve). You need to check the derivative (and possibly the second derivative) to assure that it is a boundary (the diff function will help with that). You also need to keep track of the intervals to know where you are.

1 件のコメント

duygu
duygu 2012 年 3 月 25 日
Thank u very much, I see that it's not an easy job :((

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

その他の回答 (1 件)

Daniel Shub
Daniel Shub 2012 年 3 月 25 日

0 投票

What about
sign(f1-f2)

1 件のコメント

duygu
duygu 2012 年 3 月 25 日
I checked sign function , it's for arrays. Can you suggest me a way to use sign on functions?

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

カテゴリ

Community Treasure Hunt

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

Start Hunting!

Translated by