function on separate interval
古いコメントを表示
Hello there, I have a function f(x,t) defined on (0,1). The function is however discontinuous at x=1/2 such that we have two separate values f1(x,t) for x in (0,1/2) and f2(x,t) for x in (1/2, 1). How do I program this function with M function file that takes input x and t?. Arbitrary function can be used to explain. Thanks a lot
4 件のコメント
Ced
2016 年 3 月 25 日
Just use an if statement checking in what domain your input is, and evaluate accordingly.
Oluwaseun Lijoka
2016 年 3 月 25 日
編集済み: Walter Roberson
2016 年 3 月 25 日
Walter Roberson
2016 年 3 月 25 日
Is x a scalar or a vector?
Oluwaseun Lijoka
2016 年 3 月 26 日
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Programming についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!