How to make the linear function
古いコメントを表示
first of all, on the simulation condition
pf(pf>0.06) =1;
pf(pf<0.05) =1e3;
the value of f are decrease from 1 to 0, but once the value f<0.05 then become 1e4 times
but this condition make the trasition value changed was high ( the ranges is 1-10K ) how to makes the condition (f<0.05) as linear function, so the trasition will smoothly decrease.
2 件のコメント
Sam Chak
2022 年 11 月 11 日
Best is to sketch out what the desired function looks like, and we can suggest how to build the math for it.
Some MATLAB functions do not require the input of math, only need to specify the critical points and then connect the dots to draw the line. This approach is more effective if you don't require the math for rigorous proof later.
Agung Putra
2022 年 11 月 11 日
移動済み: Walter Roberson
2022 年 11 月 11 日
採用された回答
その他の回答 (1 件)
Sam Chak
2022 年 11 月 11 日
1 投票
Aha, I see... If you want to get rid of spikes and want a smooth transition, but not strictly linear, then you can consider adding a low-pass filter (signal terminology), or a 1st-order dynamics (just need to design the time constant to ensure that the transition is fast enough).
カテゴリ
ヘルプ センター および File Exchange で Linear and Nonlinear Regression についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
