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

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

回答(1 个)

Utkarsh Belwal
Utkarsh Belwal 2020-12-3
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.

类别

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

产品


版本

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by