필터 지우기
필터 지우기

Conversion to cell from double is not possible.

조회 수: 3 (최근 30일)
valerio auricchio
valerio auricchio 2020년 3월 28일
편집: Adam Danz 2020년 3월 28일
g = {};
for k=1:4
g(k) = {fspecial('gaussian',[2 2],k)};
end
dx = {}; dy = {}; h1=[-1 0 1];h2=[1 0 -1];
for k=1:4
dx(k) = imfilter(g{k},h1);
dy(k) = imfilter(g{k},h2);
end
It gives me the error : Conversion to cell from double is not possible.

채택된 답변

Adam Danz
Adam Danz 2020년 3월 28일
편집: Adam Danz 2020년 3월 28일
dx{k} = imfilter(g{k},h1);
dy{k} = imfilter(g{k},h2);
% ^ ^ Use curley brackets
or
dx(k) = {imfilter(g{k},h1)};
dy(k) = {imfilter(g{k},h2)};
% ^ wrap in a cell ^
  댓글 수: 2
valerio auricchio
valerio auricchio 2020년 3월 28일
thanks a lott
Adam Danz
Adam Danz 2020년 3월 28일
편집: Adam Danz 2020년 3월 28일
Glad I could help.

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

추가 답변 (0개)

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by