Borrar filtros
Borrar filtros

Statistics from a writetable

2 visualizaciones (últimos 30 días)
JohnDoe_User
JohnDoe_User el 13 de Jun. de 2016
Respondida: Pavithra Ashok Kumar el 15 de Jun. de 2016
I have a code with a for loop that depends on the number of image files in a folder. I could run the loop 4 times if I am processing 4 images or 100 times if I am processing 100 images. Then I create a table with writetable. How can I do statistics (mean and standard deviation) at the end of the write table for each column of data. For example, in column 2 the results are distances. My main issue is the number of data points to average can vary everytime I run the code. Sometimes I need to average B2:B10, it could be B2 through B20...etc.
Thanks,

Respuestas (1)

Pavithra Ashok Kumar
Pavithra Ashok Kumar el 15 de Jun. de 2016
Hi I am assuming you are trying to use statistics(for eg. mean) for variable size arrays. Try using the "end" to denote the end of the array.
mean(T.Var1(1:end)) % T is the table and Var1 would be the array.

Categorías

Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by