I'm trying to generate code from a function that uses imfilter like this:
function [output] = some_function(A)
conv_kern = 15;
H = fspecial('disk', conv_kern);
A_filtered = imfilter(A, H, 'replicate');
When the function runs through Coder it generates this error:
??? Non-constant expression or empty matrix. This expression must be constant because its value determines the size or class of some expression.
Error in ==> padarray Line: 213 Column: 34
The Coder settings have A defined as a specific size and data type, and I thought the other arguments (H and 'replicate') would be considered constant, so I'm confused where the error is coming from.