Hi,
i want to sum two inline function. the functions that i want to sum are following;
f1=0;
for i=1:20
f2=f2(x(1),x(2),x(3))
f1=f1+f2
end
how can i do by using inline function?
fl1=inline('0','x(1)','x(2)','x(3)');
for i=1:20
is this true? f2=inline('f2(x(1),x(2),x(3)','x(1)','x(2)','x(3)')
f1=inline(['(' char(f) ')+(' char(flog) ')']);
end
Can anyone help me? Because i use this last summation function for fminsearch
i want to sum two inline function. the functions that i want to sum are following;
f1=0;
for i=1:20
f2=f2(x(1),x(2),x(3))
f1=f1+f2
end
how can i do by using inline function?
fl1=inline('0','x(1)','x(2)','x(3)');
for i=1:20
is this true? f2=inline('f2(x(1),x(2),x(3)','x(1)','x(2)','x(3)')
f1=inline(['(' char(f) ')+(' char(flog) ')']);
end
Can anyone help me? Because i use this last summation function for fminsearch