From: Richard on
I have a large predefined matrix that I need to use in some compiled Matlab code. I can save the file in a .mat file and load the matrix in during runtime, but I was wondering if there is a better way that I can embed the matrix with my code so I do not need to manage multiple files.
From: Lior Cohen on
"Richard" <sonoma.rich(a)mathworks.com> wrote in message <hsh73s$8b1$1(a)fred.mathworks.com>...
> I have a large predefined matrix that I need to use in some compiled Matlab code. I can save the file in a .mat file and load the matrix in during runtime, but I was wondering if there is a better way that I can embed the matrix with my code so I do not need to manage multiple files.

1. You can embed your file to the compilation by using -a option.
2. If your code consist some graphics ,you can embed the data to your figure userdata.

I really recommend on option 1.
From: Richard Gueler on
I saved my data to a "*.mat" file. I read the data file in during runtime using the "load" command in my code. I added the data file as a "Shared Resources" under the "Deployment Tool" tab for my Project. I compliled the code and it worked. I was able to deploy the executable without needed to reference and manage a separate data file.