sum of a matrix of monomials

I have a 50 by 80 matrix of monomials and i want to sum the columns of each row so that i can have a 50 by 1 matrix.Any help?

Answers (1)

sum(A,2); % A - your 'matrix of monomials'

1 Comment

I did this and it gave me an error
Error using + (line 94)
Cannot add vectors or matrices with incompatible dimensions.
Error in monomial/sum (line 32)
s = s + varargin{k};

Sign in to comment.

Asked:

on 14 Jun 2016

Commented:

on 14 Jun 2016

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!