How to calculate mean and st dev xlswrite
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (2)
Star Strider
am 2 Sep. 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 Kommentare
Star Strider
am 6 Sep. 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
am 3 Sep. 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 Kommentare
Siehe auch
Kategorien
Mehr zu Data Import from MATLAB finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!