Home > Objects > @iFunc > feval.m



[signal, model, axes, name] = feval(model, parameters, x,y, ...) evaluate a function


function [signal, model, ax, name] = feval(model, p, varargin)


 [signal, model, axes, name] = feval(model, parameters, x,y, ...) evaluate a function

   @iFunc/feval applies the function 'model' using the specified parameters and axes
     and function parameters 'pars' with optional additional parameters.
     a fast notation is to pass arguments directly to the model:
       model(p, x,y,z,...)

   signal = feval(model, 'guess', x,y, ..., signal...)
     makes a quick parameter guess. This usually requires to specify the signal
     to guess from to be passed after the axes. The parameters are then in model.ParameterValues
     or returned instead of the signal when the model can not be updated.
   signal = feval(model, NaN, x,y, ..., signal...)
     same as above, but force to get the evaluated function value with
     guessed parameters.
   signal = feval(model, [ ... Nan ... ], x,y, ..., signal...)
     requires some of the initial parameters to be given, others as NaN's. These
     values are then replaced by guessed ones, and the model value is returned.
   signal = feval(model, parameters, x,y, ...)
     evaluates the model with given parameters and axes
   signal = model(p, iData_object)
     evaluates the model on the given iData object axes and return the values
     evaluate the model and return an iData object

 input:  model: model function (iFunc, single or array)
         parameters: model parameters (vector, cell or vectors, structure, iData) or 'guess'
         x,y,..:  axes values to be used for the computation (vector,matrix,iData)
         ...: additional parameters may be passed, which are then forwarded to the model
 output: signal: result of the evaluation (vector/matrix/cell) or guessed parameters (vector)
         model:  return updated object with stored parameter values (iFunc)
         axes:   return the axes used for evaluation (cell of vector/matrix)
         name:   return model name (char)

 ex:     b=feval(gauss,[1 2 3 4]); feval(gauss*lorz, [1 2 3 4, 5 6 7 8]);
           feval(gauss,'guess', -5:5, -abs(-5:5))

 Version: Mar. 22, 2017
 See also iFunc, iFunc/fit, iFunc/plot


This function calls: This function is called by:
Generated on Wed 22-Mar-2017 09:13:30 by m2html © 2005. iFit (c) E.Farhi/ILL EUPL 1.1