Sum of elements of a multidimensional symbolic array
Ältere Kommentare anzeigen
I have a multidimensional array whose entries are polynomials. I would like to obtain the sum of all elements in the array. I know that is it is a vector is just need to use sum, if it is a matrix I would use sum twice, if it is a 3 array I would use sum three times and so on. In MATLAB, it worked fine up to a matrix, but when I tried the command sum for a 3 array it gave me the message:
Error using mupadmex Error in MuPAD command: Input arguments must be 2-D.
Error in sym/privUnaryOp (line 826) Csym = mupadmex(op,args{1}.s,varargin{:});
Error in sym/sum (line 59) s = privUnaryOp(A, 'symobj::prodsum', '_plus');
Is there any way around this?
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Mathematics finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!