In comp.soft-sys.ptolemy, [EMAIL PROTECTED] (Renooj Jacob) writes:

> I have a script file in matlab which solves a series of equations. I
> would like to access this matlab file from ptolemy and plot within
> ptolemy using the matlab expression. Is it possible? If not is there
> any other way.

I'm not sure what the format of the script file is.

You could read from the file using ExpressionReader, FileReader or
LineReader and then you could use the String actors to process the
data, though you might find it easier to create a custom actor to do
custom plotting.
You could then call the Matlab Expression actor to plot the data.


> Also i have a function file in matlab. i want to execute it from
> ptolemy. How to do that?

I don't know much about Matlab, but I did create a simple test 
that reads in a function from a .m file.

Is a function file a .m fle? 

Under Windows, running 
cd $PTII ptolemy/matlab/test
$PTII/bin/vergil mFileTest.xml
will bring up a model that reads mFileTest.m that defines a 
simple file.

The model annotation says:
  This test uses a function defined in
  an m-file called mFileTest.m.
  The packageDirectories parameter of the
  MatlabExpression actor is set to include
  $PTII/ptolemy/matlab/test in the directories
  that are searched by Matlab.
  The _debugging parameter is set to 2
  so that debugging output will appear
  on standard out.

I also created a simple wireless model that uses a .m file at
$PTII/ptolemy/domains/wireless/demo/MatlabWirelessSoundDetection/

Note that at this time you cannot use .m files with pure jar file
based installers like Web Start.  We could hack something up
that would get the .m file from a jar file and copy it to a directory
and add that directory to the packageDirectories parameter of the model.

Also, it appears that gcc-5.3 has problems running the Matlab
interface.  Use gcc-5.2 instead

> Regards
> Renooj

-Christopher

----------------------------------------------------------------------------
Posted to the ptolemy-hackers mailing list.  Please send administrative
mail for this list to: [EMAIL PROTECTED]

Reply via email to