home *** CD-ROM | disk | FTP | other *** search
/ PC Open 13 / pcopen13.iso / Zip / SM34A.ZIP / LIBRARY / FITPLOT.LI < prev    next >
Encoding:
Text File  |  1995-04-02  |  340 b   |  9 lines

  1. #  fitplot([x1,x2,...], [y1,y2,...]) fits and plots [y1,y2,...] into a
  2. #  straight line of a+b*x
  3. #  e.g. fitplot([1,2,3], [1,3/2,2]) plots a straight line and give 0.5+0.5*x
  4.  
  5. fitplot(xlist_,ylist_) := block(graph, dataplot(xlist,ylist),
  6.   y:=fit(xlist,ylist),
  7.   plot(y,x,min(xlist),max(xlist),min(ylist),max(ylist)),
  8.   y, local(y))
  9.