Summing elements of an array
7 views (last 30 days)
Hi, so for example I have P such that: P =
3×1 cell array
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.