MATLAB/Embedded Coder File Loading

I generated code for loading a mat file as follows

data=coder.load('data.mat');
a=data.a;
b=data.b;

Because one of the variables, for example "a", is very big, it is defined as a big static const array in the main function with all values initialized there.

Is there any way I can make MATLAB Coder load data from a file in C Code instead of defining it as a variable in main function?

#matlab

1 Likes2.45 GEEK