Fit function - plot only line, without the data points

25 ビュー (過去 30 日間)
yonatan s
yonatan s 2017 年 7 月 2 日
コメント済み: dpb 2019 年 3 月 27 日
hi all, im using the fit function for exponential fiting, and i want the plot to be without the data points.
thank you

回答 (1 件)

dpb
dpb 2017 年 7 月 2 日
How did you create the plot? If I use
fp=fit(x,y,'poly1');
plot(fp)
I don't get anything but the line.
But, use the optional line spec when you use plot with the fit object or save the handles to the lines and set the linestyle afterwards.
  2 件のコメント
William Campbell
William Campbell 2019 年 3 月 27 日
This works for me! How would you go about plotting fp1 and fp2 on the sam graph? I keep getting this?
>> plot(fp, fp1)
Error using cfit/plot>parseinput (line 335)
Must specify both XDATA and YDATA.
Error in cfit/plot (line 42)
[S1,xdata,ydata,S2,outliers,S3,ptypes,conflev] = parseinput(alltypes,varargin);
>> plot(fp fp1)
plot(fp fp1)
Error: Unexpected MATLAB expression.
dpb
dpb 2019 年 3 月 27 日
Only one fit object can be specified in the augmented plot routine. Use
plot(fp)
hold on
plot(fp1)
...
to add to the existing axis just as with any other plot/axis...

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeExploration and Visualization についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by