MATLAB: Matlab Coder entering varying size input

matlab coder

hi, i'm using Matlab Coder to create a static c library. i have a function, L1 which has one input. (output = L1(input)) L1 is an array that can be (2:n,1). that is, the input can be from a 2×1 array to an nx1 array. How do i enter this into the compiler, as it asks for a specific size of the input? any help would be appreciated. thanks db

Best Answer

Hi Dan,
if you use the MATLAB Coder tool for compiling, you specify the size of input either e.g. as :10 x 1 (if n always smaller or equal to 10) or :inf x 1 to have the number of rows "unlimited".
Titus