How do I numeric convert array into string Array?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentario
dpb
el 26 de Oct. de 2018
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.
Respuestas (0)
Ver también
Categorías
Más información sobre Logical en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!