35 if length(varargin) < 2
36 error(
" Must have at least two summands! ");
38 this.fungens= varargin;
44 names =
cell(1,length(f));
47 [~,name] = fileparts(which(mc.Name));
48 names[
k] = sprintf(
" %s%d ",name,k);
49 eval(sprintf(
" %s = f{%d}.getFunction; ",names[k],k));
52 names = cellfun(@(s)sprintf(
" %s(t) ",s),names,
" UniformOutput ",
false);
56 eval(sprintf(
" fhandle = @(t)%s; ",sumstr));
62 str = this.fungens[1].getConfigStr;
63 for k = 2:length(this.fungens)
72 f1 = general.functions.PiecewiseLinear(-1:.3:1);
75 f2 = general.functions.Sinus(w(1),w(2),w(3));
78 f3 = general.functions.Sinus(w(1),w(2),w(3));
81 fs = general.functions.FuncSum(f1,f2,f3);
86 res = res && f1h(x)+f2h(x)+f3h(x) == fsh(x);
102 * slen = min(len)*.99 + rand*(max(len)*1.01-min(len)*.99);
105 *
sproc = pchip(len,proc,slen);
Collection of generally useful functions.
A MatLab cell array or matrix.
A variable number of input arguments.
function [ fhandle , dfhandle ] = getFunction()
AFUNGEN Summary of this class goes here Detailed explanation goes here.
static function res = test_FuncSum()
static function char str = implode(char|rowvec data,char glue,char format)
Implodes the elements of data using glue.
function str = getConfigStr()