フィルターのクリア

Can I use multiple equation in Cftool?

2 ビュー (過去 30 日間)
Luis Alvarez
Luis Alvarez 2016 年 5 月 23 日
回答済み: Matt J 2016 年 5 月 23 日
I'm learning to use cftool and i want to use "Custom Equation" and I already know how to use it.
but the value of my function is not always the same.
I have this:
fk=sign(qp)*fc+fv*qp;
if qp == 0
if abs(tao)< fs
fq = tao;
else
fq = fs * sign(tao);
end
else
fq = fk;
end
For the first function I use this:
sign(x)*a+b*x;
And It works. But how can i use "if" or adjust my function to the different parameters?

回答 (1 件)

Matt J
Matt J 2016 年 5 月 23 日
No. You have more flexibility with LSQCURVEFIT. However, either of these toolbox functions are overkill for the equations you've shown. They are linear w.r.t the unknowns "a" and "b", so just use a linear least square solver (e.g., backslash) to solve for them.

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by