fork download
  1. a = [15.5156,0.1995;
  2. 7.6003,0.2999;
  3. 9.4829,0.2592;
  4. 12.2185,0.2239;
  5. 23.4094,0.1811];
  6.  
  7. x = a(:, 1);
  8. y = a(:, 2);
  9. n = 2; % order of the fitted polynomial trendline
  10. p = polyfit(x, y, n);
  11. m = 1000; % number of trendline points (the larger the smoother)
  12. xx = linspace(min(x), max(x), m);
  13. yy = polyval(p, xx);
  14.  
  15. figure;
  16. hold on;
  17. scatter(a(:,1), a(:,2));
  18. plot(xx, yy, 'r-');
  19.  
  20. print out.png
  21.  
Success #stdin #stdout #stderr 2.36s 71360KB
stdin
Standard input is empty
stdout
stderr
warning: print.m: epstool binary is not available.
Some output formats are not available.
warning: print.m: fig2dev binary is not available.
Some output formats are not available.
warning: print.m: pstoedit binary is not available.
Some output formats are not available.