Hi, so for example I have P such that: P =
3×1 cell array
[1]
[2]
[3].
The matrix P can be a n x 1 cell array, where n is any positive integer, and can only hold numbers. Ive tried to sum these numbers using sum(P) but keep getting the error ' Undefined function 'sum' for input arguments of type 'cell'. '. Any ideas on how I could do this? thank-you.
1 Comment
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/394675-summing-elements-of-an-array#comment_556282
Direct link to this comment
https://es.mathworks.com/matlabcentral/answers/394675-summing-elements-of-an-array#comment_556282
Sign in to comment.