Azzera filtri
Azzera filtri

I need some help on spreadsheets in Matlab

1 visualizzazione (ultimi 30 giorni)
August Hoel
August Hoel il 25 Ott 2018
Commentato: August Hoel il 26 Ott 2018
I have written a script for analysing images of biological cells, which segments them and quantify the output.
Now I need to make Matlab write this information in a spreadhsheet.
This script utililizes the regionpropstool i Matlablab, and creates an array of information on each component like:
  • Surface Are
  • Perimeter
  • MaximumAxisLength
  • MinimumAxisLength
There is always an unknown amount of cells (Cn) that has an uknown amount of mitochondrion (Mn).
I need to make Matlabs add the following information to a spreadsheet:
C1 | C2 | C3 | C4 | ...Cn
M1 data
M2
M3 data
M4
..
Mn
The problems is that I dont know how to make Matlab add a new row or column, each time it processes a cell. So how does it assign a number to Cn and Mn
  6 Commenti
Guillaume
Guillaume il 26 Ott 2018
Thank you, your explanation is much clearer. I do something similar for my work except that I look at images of droplets. I have an unspecified number of images each with a varying number of droplets.
What I don't particularly understand is your proposed storage. Wouldn't each cell (image?) has a varying number of mitochondria? In that case, it doesn't really make sense to have the storage you propose, which is in effect a 3D array (Cell x Mitochondria x paremeter). In my opinion, you would be better off using a 2D storage where each row is a mitochondria, and the cell it comes from as another parameter. Something like:
Mitochondria | Cell | Area | Perimeter | MajorAxis | MinorAxis
1 1 xxx yyyy zzzz ccccc
2 1 xxx yyyy zzzz ccccc
3 1 xxx yyyy zzzz ccccc
1 2 xxx yyyy zzzz ccccc
2 2 xxx yyyy zzzz ccccc
1 3 xxx yyyy zzzz ccccc
....
With regards to conversion from pixel to micrometer, this really warrant its own question. To do this you need to know the scale of your images. You know this either by taking an image of an object of known size under the same imaging conditions, or you know this becaue you know the magnification of your imaging system.
August Hoel
August Hoel il 26 Ott 2018
Thanks, I was also suggested by some other people that this was the best way to arrange the data. I however have a problem with making MatLab do the following. How do I import:
mitStats = regionprops(mitLabel, 'All');
%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];
mitMinL = [mitStats.MinorAxisLength];
Is it better to use an array, or MatLab table? How do I get it to assign each Mitochondrion a new string variable (M1, M2...Mn), when there is an unknown amount of mitochondria in the cell? and to import this data into this spreadsheet. I am have been searching my brains out through google, and I cant find any clever way to do this? Which codes and commands should I look into?

Accedi per commentare.

Risposte (0)

Prodotti


Release

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by