source: MML/trunk/machine/SOLEIL/common/toolbox/ezyfit/ezyfit/evalfit.m @ 4

Last change on this file since 4 was 4, checked in by zhangj, 10 years ago

Initial import--MML version from SOLEIL@2013

File size: 800 bytes
Line 
1function y=evalfit(f,x)
2%EVALFIT  Evaluate a fit
3%   Y = EVALFIT(F,X) evaluates the fit F for the values X.  F is a fit
4%   structure, as obtained by EZFIT, SHOWFIT or SELECTFIT. Y is a vector
5%   of the same length as X, with Y(i) = F(X(i)).
6%
7%   Example:
8%     plotsample('power');
9%     f = ezfit('power; log');
10%     x = logspace(1,3,1000);
11%     hold on; plot(x,evalfit(f,x),'r-'); hold off;
12%
13%   See also EZFIT, SHOWFIT, FITPARAM.
14
15%   F. Moisy, moisy_at_fast.u-psud.fr
16%   Revision: 1.01,  Date: 2006/09/04
17%   This function is part of the EzyFit Toolbox
18
19% History:
20% 2006/02/16: v1.00, first version.
21% 2006/09/04: v1.01, help improved.
22
23m = f.m;
24x__ref = x;
25y = eval(eq2ml(f.eq, f.xvar));
26if length(y)==1, % if the fit is a cste,
27    y=y*ones(1,length(x));
28end;
Note: See TracBrowser for help on using the repository browser.