How to calculate mean and st dev xlswrite
4 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
I have obtained a code that allows me to collect various types of data from microscope images, such as x and y position, image plane #, and total intensity. The code uses the xlswrite function to export the data into an excel file. I am wondering how to modify this code such that it will calculate the mean and st dev of the total intensity values for me and include it in the excel sheet. There are generally ~20 total intensity values per image.
0 comentarios
Respuestas (2)
Star Strider
el 2 de Sept. de 2016
You could certainly hack the existing code, but it would be easier to simply take the mean and standard deviation of the data when you read it into your code (using xlsread).
2 comentarios
Star Strider
el 6 de Sept. de 2016
My point is that it would be easier to calculate the mean and std values in your script on the data you read than changing the code that writes the Excel files.
Image Analyst
el 3 de Sept. de 2016
How are you (or "the code") calculating "total intensity"? What is it? Assuming it's an array, you can compute the mean and stdev just doing this:
meanIntensity = mean(totalIntensity);
sdIntensity = std(totalIntensity);
If it's just a single number, then you'll have to tell us what the difference is between the "mean" and the "total" of the intensity values. Is total the sum of all the intensity values? If so, then the mean is totalIntensity/numberOfPixels.
0 comentarios
Ver también
Categorías
Más información sobre Data Import from MATLAB 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!