필터 지우기
필터 지우기

How save data from cell to array?

조회 수: 1 (최근 30일)
Ragavendiran R
Ragavendiran R 2016년 12월 29일
편집: Stephen23 2016년 12월 30일
Hi everyone, I want to save centroid value as an array (excel sheet format). but, I am getting [x,y] in a single cell. I don't know how to convert it.
My code
for i=1:files
file = imagefiles(i).name;
I = imread(file);
BW = im2bw(I,0.6);
BW3 = imcomplement(BW);
BW4 = imfill(BW3,'holes');
BW6 = imcomplement(BW4);
C{i} = regionprops(BW6,'centroid');
end
Output:
{}C 158*1 cell /workspace
[2.51,4.82] /in each cell both value separated comma

답변 (1개)

Ahmet Cecen
Ahmet Cecen 2016년 12월 29일
Checkout cell2mat.

카테고리

Help CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by