How I can write a following statement in Matlab?

1 回表示 (過去 30 日間)
Mubarak Alanazi
Mubarak Alanazi 2018 年 11 月 24 日
編集済み: dpb 2018 年 11 月 25 日
How I can write following statement in Matlab:
  2 件のコメント
dpb
dpb 2018 年 11 月 24 日
編集済み: dpb 2018 年 11 月 25 日
You'll need to write a function using if...elseif...elseif...else...end or you could be creative and write the function using interp1 if wanted a one-liner.
Actually, I was just kicked in the teeth again by the silly restriction of interp1 that only accepts a scalar extrapolation value instead of a two vector for each end...why, TMW hamstrung it such is a pain for such cases. It seems like I figured out a workaround some years ago, but it doesn't strike me at the moment what it was... :( This may just be enough to submit the enhancement request.
Image Analyst
Image Analyst 2018 年 11 月 24 日
Do you want to create a vector of R values? If so, what is the range of x you'd like to evaluate it over?
Or, do you want a function that takes a single input argument, x, and returns a single output argument, a scalar R?

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

回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by