How do I numeric convert array into string Array?

2 次查看(过去 30 天)
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 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by