I'm working on a MATLAB Coder project where I want to load some constant values. After trying many possibilities, all unsuccessfully, I came up with the "coder.load" directive that loads variables from MAT files and assumes them as compile time constants in generated C-code.
This is the error that I get:
Found unsupported class for variable using function 'coder.load'. Mixed field types in structure arrays are not supported. Type at 'ind_x.params(1).name' differed from type at 'ind_x.params(2).name'.
But the problem is that the "name" field of the "params" structure array has the same type for each array element. Indeed, trying it out on the command window gives me the same type:
>> class(ind_x.params(1).name)
ans =
char
>> class(ind_x.params(2).name)
ans =
char
There are other fields of the structure array that are of type "double", and one of type "bool", but the type doesen't change inside different array elements of the same field, that's why I don't understand the error.