Hi all, I have a problem with using symsum and arrays. For example consider the following code, and I get the error 'Error using syms, using input and output arguments simultaneously is not supported '. How could I fix it?
Error using mupadengine/feval2char Unable to convert expression containing symbolic variables into double array. Apply 'subs' function first to substitute values for variables.
Error in sym/double (line 755) Xstr = feval2char(symengine, "symobj::double", S);
Symbolic variables can never be used to index an array.
When you have a finite set of things to index in an expression, you should not use symsum() or symprod(): instead you should create the full list of values as arrays, and sum() or prod() as appropriate.
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.