Hi, I have a working anonymous function that takes a vector of size 1×3 and I want to expand this to 3×3. The function is named mu_x and looks like this
mu_x=@(t) f_lx(t,param);function res=f_lx(x,param)a=param(1);b=param(2);c=param(3);res = zeros(size(x));ind = x>100;res(ind) = a+b*exp(c*100)+(x(ind)-100)*0.001;res(~ind) =a+b*exp(c*x(~ind));end
The 1×3 param is now [a b c] and the 3×3 parameter I want to use is subject to x such as:
x=65-59 param(:,1)x=70-76 param(:,2)x=77-106 param(:,3)
just to clarify the new param looks something like this
a1 b1 c1a2 b2 c2a3 b3 c3
How can the anonymous function be changed to consider the ranges of x and new format of param?
Best Answer