Export a 1xn cell array of co-ordinates to excel and separate on the basis of the column

1 view (last 30 days)
For a series of images:
for n = 1:length(Images)
baseFileName = Images(n).name; ....
I have extracted the co-ordinates of manually selected blobs:
coord{n} = [X(:),Y(:)];
,producing a 1xn cell array, where each column contains image specific (n) co-ordinates.
I am trying to export these co-ordinates to excel, where co-ordinates are organised under image name (baseFileName) rather than just n. Can anyone help with this?
I hope I have included enough information, I didn't want to include a load of irrelevant code.
Many thanks in advance,

Answers (1)

Utkarsh Belwal
Utkarsh Belwal on 3 Dec 2020
Hi
You can use the writecell command to export the data to an excel file,
writecell(C,'data.xlsx','Sheet','Blocbs','Range','A1');
Here C is the cell array that you wanted to write,
Blobs is the name of spreadsheet and,
A1 is the cell from which you wanted to write.
To organize the data according to the image name you can create a 2*n cell in which the first row contains the image name.

Categories

Find more on Images in Help Center and File Exchange

Products


Release

R2020b

Community Treasure Hunt

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

Start Hunting!