MATLAB: How to compile a mat file

MATLAB Compiler

I need to compile a m file which calls a mat file(matlab.mat) containing a neural network, SVM architecture and two matrices. Compilation of the m file yields a exe file which when run through command prompt says matlab.mat cannot be found. The following msgs wer obtained during compilation..
MATLAB:I18n:InconsistentLocale – The system locale setting, English (India)_India.1252, is different from the user locale setting, English (United States)_United States.1252. Compiler version: 4.7 (R2007b) Processing C:\Program Files (x86)\MATLAB\R2007b\toolbox\matlab\mcc.enc
Processing C:\Program Files (x86)\MATLAB\R2007b\toolbox\bioinfo\mcc.enc
Processing C:\Users\Ramprasad\Documents\MATLAB\popGUI.fig
Processing C:\Program Files (x86)\MATLAB\R2007b\toolbox\stats\mcc.enc
Processing C:\Program Files (x86)\MATLAB\R2007b\toolbox\optim\mcc.enc
Processing C:\Program Files (x86)\MATLAB\R2007b\toolbox\shared\optimlib\mcc.enc
Processing C:\Program Files (x86)\MATLAB\R2007b\toolbox\matlab\guide\guideopts.fig
Processing C:\Program Files (x86)\MATLAB\R2007b\toolbox\matlab\winfun\actxcontrolselect.fig
Processing C:\Program Files (x86)\MATLAB\R2007b\toolbox\matlab\winfun\actxcontrolcreateproperty.fig
Processing include files...
2 item(s) added.
Processing directories installed with MCR...
The file mccExcludedFiles.log contains a list of functions excluded from the CTF archive.
1 item(s) added.
Generating MATLAB path for the compiled application...
Created 39 path items.
Begin validation of MEX files: Wed Mar 23 14:14:14 2011
Validating 'C:\Program Files (x86)\MATLAB\R2007b\toolbox\compiler\deploy\deploywhich.mexw32'.
No conflicting M-file found.
Validating 'C:\Program Files (x86)\MATLAB\R2007b\toolbox\compiler\deploy\readline.mexw32'.
No conflicting M-file found.
End validation of MEX files: Wed Mar 23 14:14:14 2011
Deleting 2 temporary MEX authorization files.
Removing: 'C:\Users\RAMPRA~1\AppData\Local\Temp\mathworks_tmp_17318_7512.auth'.
Removing: 'C:\Users\RAMPRA~1\AppData\Local\Temp\mathworks_tmp_26929_7512.auth'.
Parsing file "C:\Users\Ramprasad\Documents\MATLAB\popGUI.m"
(Referenced from: "Compiler Command Line").
Parsing file "C:\Program Files (x86)\MATLAB\R2007b\toolbox\compiler\deploy\deployprint.m"
(Referenced from: "Compiler Command Line").
Parsing file "C:\Program Files (x86)\MATLAB\R2007b\toolbox\compiler\deploy\printdlg.m"
(Referenced from: "Compiler Command Line").
Generating file "popGUI_main.c".
Generating file "C:\Users\Ramprasad\Documents\MATLAB\readme.txt".
Generating file "popGUI_mcc_component_data.c".
Executing command: mbuild -O -v -output "popGUI" "popGUI_main.c" "popGUI_mcc_component_data.c" -link exe
This is mbuild Copyright 1984-2006 The MathWorks, Inc.
-> Default options filename found in C:\Users\Ramprasad\AppData\Roaming\MathWorks\MATLAB\R2007b
----------------------------------------------------------------
-> Options file = C:\Users\Ramprasad\AppData\Roaming\MathWorks\MATLAB\R2007b\compopts.bat
-> COMPILER = lcc
-> Compiler flags:
COMPFLAGS = -c -Zp8 -I"C:\PROGRA~2\MATLAB\R2007b\sys\lcc\include" -noregistrylookup
OPTIMFLAGS = -DNDEBUG
DEBUGFLAGS = -g4
arguments =
Name switch = -Fo
-> Pre-linking commands =
-> LINKER = lcclnk
-> Link directives:
LINKFLAGS = -tmpdir "." -L"C:\PROGRA~2\MATLAB\R2007b\sys\lcc\lib" -libpath "C:\PROGRA~2\MATLAB\R2007b\extern\lib\win32\lcc"
LINKFLAGSPOST = mclmcrrt.lib
Name directive = -o "popGUI.exe"
File link directive =
Lib. link directive =
Rsp file indicator = @
-> Resource Compiler =
-> Resource Linker =
----------------------------------------------------------------
--> "lcc -c -Zp8 -I"C:\PROGRA~2\MATLAB\R2007b\sys\lcc\include" -noregistrylookup -FoC:\Users\RAMPRA~1\AppData\Local\Temp\mbuild_E0375B3F-9EF9-4962-BFA9-3105EBD02200\popGUI_main.obj -IC:\PROGRA~2\MATLAB\R2007b\extern\include -IC:\PROGRA~2\MATLAB\R2007b\simulink\include -DNDEBUG popGUI_main.c"
--> "lcc -c -Zp8 -I"C:\PROGRA~2\MATLAB\R2007b\sys\lcc\include" -noregistrylookup -FoC:\Users\RAMPRA~1\AppData\Local\Temp\mbuild_E0375B3F-9EF9-4962-BFA9-3105EBD02200\popGUI_mcc_component_data.obj -IC:\PROGRA~2\MATLAB\R2007b\extern\include -IC:\PROGRA~2\MATLAB\R2007b\simulink\include -DNDEBUG popGUI_mcc_component_data.c"
Contents of C:\Users\RAMPRA~1\AppData\Local\Temp\mbuild_E0375B3F-9EF9-4962-BFA9-3105EBD02200\mbuild_tmp.rsp:
C:\Users\RAMPRA~1\AppData\Local\Temp\mbuild_E0375B3F-9EF9-4962-BFA9-3105EBD02200\popGUI_main.obj C:\Users\RAMPRA~1\AppData\Local\Temp\mbuild_E0375B3F-9EF9-4962-BFA9-3105EBD02200\popGUI_mcc_component_data.obj
--> "lcclnk -o "popGUI.exe" -tmpdir "." -L"C:\PROGRA~2\MATLAB\R2007b\sys\lcc\lib" -libpath "C:\PROGRA~2\MATLAB\R2007b\extern\lib\win32\lcc" @C:\Users\RAMPRA~1\AppData\Local\Temp\mbuild_E0375B3F-9EF9-4962-BFA9-3105EBD02200\mbuild_tmp.rsp mclmcrrt.lib"
--> "if exist C:\Users\RAMPRA~1\AppData\Local\Temp\mbuild_E0375B3F-9EF9-4962-BFA9-3105EBD02200\templib.def del C:\Users\RAMPRA~1\AppData\Local\Temp\mbuild_E0375B3F-9EF9-4962-BFA9-3105EBD02200\templib.def"
--> "if exist C:\Users\RAMPRA~1\AppData\Local\Temp\mbuild_E0375B3F-9EF9-4962-BFA9-3105EBD02200\templib_stub.obj del C:\Users\RAMPRA~1\AppData\Local\Temp\mbuild_E0375B3F-9EF9-4962-BFA9-3105EBD02200\templib_stub.obj"
I need to how to compile this mat file.
Any help would be appreciated..

Best Answer

Have you added the MAT-file to the CTF archive? If using the mcc command, use the -a option to specify the filename.
For example:
mcc -m mainProgram.m -a matlab.mat
If using deploytool, add the MAT-file to the package by dragging it into the "Other Files" section.