I'm trying to convert my function called myFunc to C. The 'signal' input argument is a vector (1000, 1) that contains only uint16 numbers.
function [out] = myFunc(signal)
[c,l] = wavedec(signal, 8, 'db8');
[out] = detcoef(c,l, 4);
When I tried to convert this MATLAB function to a C function, I got a error inside the: wavedec.m - Line 29
This assignment writes a 'double' value into a 'single' type. Code generation does not support changing types through assignment. Check preceding assignments or input type specifications for type mismatches.
When I put my mouse over the 'c' variable on the error window, MATLAB shows me that this 'c' variable is single type and 'zeros(0, 1)' return a double type.
Could you please help me to convert this function to a C file?