Change y axis length without changing axis range
古いコメントを表示
Hi
I have the following code
mid_bin = [196.2500 268.7500 341.2500 413.7500];
corr_perct = [0.4167 0.9412 1.0000 0.8750];
f = fit(mid_bin', corr_perct', 'poly2')
plot(f,mid_bin',corr_perct')
axis([160 450 0 1])
As you can see, the fitted curve does not fit into the plot. Now I do NOT want to change the y axis range since with the upper limit 1 = 100% since my y-values can not have a value bigger than 1 (bigger than 100%) - but I want the fitted curve to be fully visible. How do I achieve that? Thanks
回答 (1 件)
Purushottama Rao
2015 年 5 月 11 日
0 投票
You may require an higher order polynomial to do that. You may require more data points to exaclty fit a curbve to the data
5 件のコメント
MiauMiau
2015 年 5 月 11 日
Purushottama Rao
2015 年 5 月 11 日
Your fit function generates y values greater than 1(see attached fig). This is becasue of the tolerances of the fit function. If you strictly want the data to be in the range, consider changing the fit function.
MiauMiau
2015 年 5 月 11 日
Purushottama Rao
2015 年 5 月 11 日
Increase the data points and use higher order polynomial function say poly6 or so. Otherwise incerase your y axis to 1.2 or so..
Purushottama Rao
2015 年 5 月 11 日
you can alos use fourier2 as a curve fitiign function
カテゴリ
ヘルプ センター および File Exchange で Interpolation についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!