Hi Sai,
Since your table is a cell array, you would first need to convert your "tot" to an array to execute "sum" on it. For example, instead of doing:
sum(tot{:,3})
it is easiest to do this in 2 steps. Specifically:
totArray = [tot{:,3}]
totN = sum(totArray)
This is because "sum" does not take comma separated lists as an input, which is what tot{:.3} would return. Hope this helps!