I have a 1×12 table, Is there any quick way or function to find percentage for each column based on total?

for example:

data = (1,2,3)

percent first = (1*100)/(1+2+3) = 16.66 %

percent two = (2*100)/(1+2+3) = 33.33 %

Skip to content# MATLAB: Calculating percent of data in table

###### Related Question

MATLAB

I have a 1×12 table, Is there any quick way or function to find percentage for each column based on total?

for example:

data = (1,2,3)

percent first = (1*100)/(1+2+3) = 16.66 %

percent two = (2*100)/(1+2+3) = 33.33 %

- How to insert a n x m matrix or table, into an existing table
- How to subset data based on time range
- Table gui, set parameters
- How to calculate Sums in a Panel Data framework using “For Loops”
- Retrieve data from uitable when user enters data
- Get error message of ‘Error using max Invalid data type. First argument must be numeric or logical’ when I attempt to apply max function to a column of data
- Need to Split a column of type ‘string’ in a Table in to group of 4 characters giving new names to the result.

## Best Answer