Steps: Start here
|
What to do
|
ATTENTION
Insert the following lines in the .bashrc file as shown. The .bashrc
file is located in /home/username.
- <bash>cd
- <bash>vi
.bashrc
|
function
expmatlib
{
m7=/usr/local/matlab7/bin/glnx86;
export
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$m7
} |
Save and exit the
.bashrc file and then source the file
|
<bash> source .bashrc <enter>
|
cd into the src/
directory for this exercise
|
<bash> cd
~/aero361/lab_matlab/src
|
Before running the
Makefile.mk in the src/ dir execute the expmatlib function
|
<bash> expmatlib < enter>
|
Use the Makefile or if you have not been enlightened by
aero361 then use the caveman approach to compiling the files.
|
<bash> make -f Makefile.mk
<bash>
ifc -c -w main.f90 plot4.f90
|
link
the files (if you do not have a Makefile.mk). For those who are using a
Makefile place library and its path in the Makefile. Review the
downloaded Makefile it shows the user how to access libraries. Its
probably done for you, but review it!
|
<bash> ifc [file1.o] ......
[filen.o]-o step1 -L/usr/local/matlab7/bin/glnx86/
-leng
|
cd into the bin dir
and run the code
|
<bash> cd ../bin; ./code.x
|
open up the main.f90
and plot.f90 and review the code and refer to these pages and the
function call list in the next cell
Using the MATLAB Engine
The Engine Library
GUI-Intensive Applications
Calling MATLAB from a Fortran Application
|
<bash> vi
.............
|
COMMON MATLAB FUNCTION NAMES FOR THE INTERFACE
|
|