How to organize and analyze my excel files in matlab?
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi I am new to matlab.
I use CellProfiler software to output large excel files(.csv).
Basically what I usually do is load a bunch of images from a bunch of wells across 5 or so treatment conditions. Each image has 20-30 bunch of biological cells labled with a fluorescent marker in ch00, ch01, ch02,ch03 etc..
I first segment the cells ( called objects) and make a shit ton of measurements on them ( e.g. size, mean intensity of a particular color channel, form factor etc...).
All I need to do is take mean and median values on all the measurements according to treatment and measurement type so I can stick them in graph pad prism to make figures.
I'd like a versatile script to account for changes in the types and numbers of measurements I am taking as well as the types and numbers of treatment conditions...
However, I am new to matlab so any help appreciated!
See attached for example file.
댓글 수: 0
답변 (1개)
Jacob Wood
2020년 2월 23일
Hi Randy,
readtable() might be a nice place to start. https://www.mathworks.com/help/matlab/ref/readtable.html
After the data is in Matlab you can use some of the helpful grouping functionality to do what you are trying to do: https://www.mathworks.com/help/matlab/matlab_prog/grouping-variables-for-splitting-data.html
Alternatively, you can use logical indexing. An example of this is below.
One example, to read the data and plot the mean 'Correlation_Correlation_Cx43_FActin' for each 'ImageNumber' would look something like this (liable to be buggy as I don't have Matlab here so this is untested):
file_name = 'IF66NewBorder.csv';
selected_column = 'Correlation_Correlation_Cx43_FActin';
T = readtable(file_name);
images = unique(T.ImageNumber);
means = NaN(size(images));
for ii = 1:numel(images)
image_num = images(ii);
selected_rows = T.ImageNumber==image_num;
means(ii) = mean(T.(selected_column));
end
figure
plot(images,means,'.-')
xlabel('ImageNumber')
ylabel(['Mean of ' selected_column])
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Spreadsheets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!