Anyone know what functions I should combine to produce the custom function I need? I need it to output the following: f(g(x),x,1,n)=stack(g(1),g(2),g(3),g(4),...,g(n-1),g(n)) for any given n value, but I can't seem to find the proper combination of functions and operators to do it.
One also could use a loop to design the string representation of a multi-argument stack command and then convert it to an expression with str2num(). Yet I guess this would not make the thing more comprehensible.