Hi,
I need to resolve the following problem:
I have a vector of input numbers (in) and I have to multiply it for a variable (a). My output (out) must be that vector that has an upper limit of 100 (clearly the output depends on the variable). Then I need to sum the vector "out" and divide it for "a" and plot the result in function of "a". I tried this way:
syms a
A=in*a;
out=min(A,100);
fun=sum(out)/a;
fplot(fun)
As far as I understand though I cannot run the "min" command because that instruction doesn't work on a symbolic vector. Anyway the error is:
Error using symengine
Input arguments must be convertible to floating-point numbers.
Error in sym/privBinaryOp (line 1030)
Csym = mupadmex(op,args{1}.s, args{2}.s, varargin{:});
Error in sym/min (line 78)
C = privBinaryOp(X, Y, 'symobj::zipWithImplicitExpansion', 'symobj::minComplex');
In case it's important for the help, the aim of the excersise is writing a mathematical function (fun) based on the variable "a"; the actual value of "a" will be determined only at the end minimizing the function "fun".
Thank you in advance