locfit_all.m 465 B

12345678910111213141516171819202122232425
  1. function out=locfit_all(varargin)
  2. % Smoothing noisy data using Local Regression and Likelihood.
  3. %
  4. % This is a combination of the locfit and predict functions
  5. %
  6. % Minimal input validation
  7. if nargin < 1
  8. error( 'At least one input argument required' );
  9. end
  10. predict_args = {};
  11. locfit_args = varargin{1};
  12. if nargin==2
  13. predict_args = varargin{2};
  14. end;
  15. fit = locfit( locfit_args{:} );
  16. predict_out = predict( fit, predict_args{:} );
  17. out = {fit predict_out};