How to sum up a column in Matlab?

4 views (last 30 days)
ONG ZHI SAN
ONG ZHI SAN on 7 Apr 2021
Commented: KSSV on 7 Apr 2021
I have created a table as attached in Matlab. How do I create a new row which shows the total of Moles?

Accepted Answer

KSSV
KSSV on 7 Apr 2021
iwant = sum(T.(4))
  2 Comments
ONG ZHI SAN
ONG ZHI SAN on 7 Apr 2021
is it possible to add the answer in the table?
KSSV
KSSV on 7 Apr 2021
You see sum is going to be a single number and your table height (number of rows) is more, it looks wierd to add a single number to the table.

Sign in to comment.

More Answers (0)

Tags

Community Treasure Hunt

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

Start Hunting!