Re: retain the fit and remove the curve



Another approach might be to use "Generate-M File" in the "File" menu. You
could then see how the fit is calculated and plotted. You would need to
modify the generated file to plot only the fit.

"Pekka Kumpulainen" <pekka.nospam.kumpulainen@xxxxxxxxxxxxx> wrote in
message news:gd7cja$f8v$1@xxxxxxxxxxxxxxxxxxxxx

"S N RAY" <suryanarayana_gs@xxxxxxxxx> wrote in message
<gd72b6$jur$1@xxxxxxxxxxxxxxxxxx>...

A plot is made in Matlab using plot() command of some data and then using
the Basic curve fitting GUI in the graph a curve of some order of
polynomial is fitted to the curve.Now I wish to remove the original curve
retaining only the fit. I tried 'imsubtract' but to no help. How can this
be done ?

h = plot(.....); this will give you the handle to the line of the data.
The logical approach would be to delete the original line after the fit:
delete(h)
But for some reason this will also remove the fit (R2008b) (I really hate
these GUIs and the way MATLAB is more and more automagically doing stupid
things)

Anyway, this will work as a quick workaround:
set(h,'Visible','off') % hide the data
legend off % remove the legend



.



Relevant Pages

  • Re: Fitting Data
    ... to plot this data and plot a line of best fit through it! ... My curve starts off with a curving section upwards, ... After that, you would have to fit the two sections, compute the overall residual, and move the breakpoint one direction or the other and repeat until you locate a minimum. ... A common-enough problem that might have some code at the Code Exchange, ...
    (comp.soft-sys.matlab)
  • nokey causing not plotting a function?
    ... I'm trying to plot two set of points from data files along with two fit curves for this data. ... Strangely, gnuplot misses one of the function, especially when "set nokey" is used. ...
    (comp.graphics.apps.gnuplot)
  • Re: Possible bug related with fit command and line style color
    ... do a fit and then try to plot a graph with customized line color, ... graph is shown. ... before the first fit command, ...
    (comp.graphics.apps.gnuplot)
  • Re: identify separate weighted probability plots
    ... Anyway, the probability plot is bi-modal and I would like to fit separate weighted curves to the peaks, plot, and have some sort of confidence number plotted and displayed. ... I believe you want to treat this as a distribution fitting problem instead of creating a histogram and fitting a curve to the bar heights. ...
    (comp.soft-sys.matlab)
  • Re: Equation of line fitting data
    ... The thought was to use an equation with reasonable fit to ... The rmse of Jim Bunch's approximation is .702. ... Well, you suggested the power function, and the plot supported your ... For the unshifted power function, a*x^b, I used Mathematica's FindFit ...
    (sci.stat.math)