cell operattion double to uint8

조회 수: 14 (최근 30일)
Internazionale
Internazionale 2013년 3월 18일
i have a cell A{64,4} and the type is double. i want to conversion double to uint8. but in matlab it is not possible because A is cell. the input of conversion must array. how to change cell to array so i can do the conversion ?
  댓글 수: 1
Jan
Jan 2013년 3월 18일
The type of a cell is 'cell'. Therefore I assume, you mean than the cell elements are of type 'double'.

댓글을 달려면 로그인하십시오.

답변 (2개)

TAB
TAB 2013년 3월 18일
A_InArrayFormat = cellfun(@uint8,A);
A_InCellFormat = cellfun(@uint8,A,'UniformOutput',0);

Jan
Jan 2013년 3월 18일
And a simple loop:
for iC = 1:numel(C)
C{iC} = uint8(C{iC});
end

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by