imfilter with matlab Coder???

조회 수: 3 (최근 30일)
dang hong
dang hong 2014년 5월 23일
답변: Leepakshi 2025년 4월 3일
When I used imfilter() function with Matlab coder , it appears error" Expected input number 1, A to be one of theses types: numveric,logical. Instead its type was embedded.fi
How can I fix this problems?

답변 (1개)

Leepakshi
Leepakshi 2025년 4월 3일
Hey Dang,
The error you're encountering is due to the imfilter() function expecting its first input to be of a numeric or logical type, but it's receiving a fixed-point type (embedded.fi).
Convert the fixed-point data to a floating-point type such as double or single before passing it to imfilter().
if isa(A, 'embedded.fi')
A = double(A); % Convert to double if it's a fixed-point type
end
filtered_image = imfilter(A, h);
Please refer to below documentation for more clarity:
Hope this helps!

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by