[12094] in Athena Bugs

home help back first fref pref prev next nref lref last post

sun4 7.6R: matlab external interface

daemon@ATHENA.MIT.EDU (jesse@MIT.EDU)
Fri May 27 14:11:09 1994

From: jesse@MIT.EDU
To: bugs@MIT.EDU
Date: Fri, 27 May 94 14:11:02 EDT

System name:		dale
Type and version:	SPARC/Classic 7.6R
Display type:		cgthree

What were you trying to do?
	Use the external interface for calling matlab routines
	within C programs.

What's wrong:
	In the engOpen("\0") line, matlab starts, but nothing is
	returned because the way matlab is set up here on athena,
	the command matlab actually executes the shell script
	matsim.sh in /mit/matlab/Matlab4.1/bin which sets a lot
	of environment variables and then starts matlab.

What should have happened:
	Possibly I need to change the startcmd line given as an
	argument to engOpen() to something better.  But just as a
	note, none of the example programs that matlab supplies do
	not work because of this.  That is because engOpen I believe
	tries to connect pipes to the stdin and stdout for matsim.sh
	instead of the actual matlab process, and so engOpen doesn't
	return anything at all for a pointer to the matlab engine.

	If another file could be created that sets all the environment
	variables, then I could source that files first, then use
	engOpen("matlab4.x").

Please describe any relevant documentation references:
	The Matlab External Interface Guide - which actually has some
	typos in it.

home help back first fref pref prev next nref lref last post