Exporting Curves to Density Plot
1 ビュー (過去 30 日間)
表示 古いコメント
Kendall Cooney
2021 年 10 月 3 日
コメント済み: Kendall Cooney
2021 年 10 月 27 日
I have a few curve-fitting objects from applying a Gaussian fit to a histogram as shown below. The curves come out fine, but I'm now trying to save those curve values and turn them into a "density" plot (birds eye view of multiple histograms). Any advice on how to save these data values so I can use them in another graph?
f = fit(x,y,'gauss1');
0 件のコメント
採用された回答
Abhiroop Rastogi
2021 年 10 月 27 日
Hi Kendall,
You can extract the data from the curve variable "f", obtained using the "fit" function, by using the coefficients that are stored in the variable "f", as shown in the example below. The values of the coefficients "a1", "b1", and "c1" can be extracted using the notation "f.a1", "f.b1", and "f.c1" respectively.
x = randn(100,1);
y = randn(100,1);
f = fit(x,y,'gauss1')
その他の回答 (0 件)
参考
カテゴリ
Find more on Histograms in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!