How do I numeric convert array into string Array?

I am trying to make a tidy table to quanitfy segmented data from this:
I have extracted the information I want using this code:
%%Label items for quantification
mitLabel = bwlabel(Ibin,8)
%Display labeled Items
if true
figure;
subplot(1,2,1), imshow(I), title('Original');
subplot(1,2,2), imshow(label2rgb(mitLabel, 'jet', [.7 .7 .7], 'shuffle')), title('Labeled RGB');
end
%Set parameter
mitStats = regionprops(mitLabel, 'Area', 'Perimeter', 'MajorAxisLength', 'MinorAxisLength')
%Extract arrays for area, perimeter, major axis length and minor axis length for each element in binary image
mitArea = [mitStats.Area];
mitPerimeter = [mitStats.Perimeter];
mitMaxL = [mitStats.MajorAxisLength];
I am planning on presenting this data as following:
Area Perimeter etc.
M1 C1 4 5
M2 C1 10 200
M3 C2 40 40
M4 C2
M5 C3 etc
M6 C4
Mn Cn
Mn Specifies mitochondria number, while Cn specifies which cell the mitochondria is confined in I am making this system because its easier to handle later when I am examining the data (Tidy Data?)
I however need a way for the computer to assign each struct(mitchondria) in the array a number (Mn), but also each cell which is being examined a number. The problem is that every cell contains and unknown number of mitochondrion, so how do I make the Matlab assign each mitochondrion a new variable in the table?

댓글 수: 1

dpb
dpb 2018년 10월 26일
Probably attaching a .mat file with a sample dataset would be easiest for someone else to to work with to try to understand the actual data arrangement...
Storing data as incomplete tables isn't really feasible; you could have a structure array or cell array or maybe even flatten the structure to a table might be the simplest way to organize.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

도움말 센터File Exchange에서 Images에 대해 자세히 알아보기

질문:

2018년 10월 26일

댓글:

dpb
2018년 10월 26일

Community Treasure Hunt

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

Start Hunting!

Translated by