フィルターのクリア

Is there a faster way calculating the y value of a gaussian line of fit?

3 ビュー (過去 30 日間)
Trishal Zaveri
Trishal Zaveri 2018 年 2 月 3 日
回答済み: Walter Roberson 2018 年 2 月 3 日
I was wondering how to find the y value of a gaussian line of fit. It gives me the coefficients (a1, b1, c1, a2...) and the equation for the line, but I have to manually do put it in the calculator to find the answer. I have about 20 terms, so I was wondering if there was a faster way to calculate it and find that y value. I am very new to MATLAB, so I hope you all can help me out. I will greatly appreciate it. Thank you!!!

回答 (1 件)

Walter Roberson
Walter Roberson 2018 年 2 月 3 日
If you are using fit() to produce a cfit object, then you can call the cfit object like it was a function in order to calculate the value at the given location. For example,
cf = fit(...., xdata, ydata);
x_to_project = linspace(-10, 10);
y_projected = cf(x_to_project);

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by