calling matlab from perl using a script -
i know how 1 call matlab perl script? exact, want run *.m file
a = zeros(10)
from perl. way, using eclipse ide perl.
i searched while, not find clear answer. please help!
one write here *.m file matlab without using matlab text editor or comment following lines till line eof
.
start write 'call_mfile.m' lines after print $matlab <<eof;
open(my $matlab, '>', 'call_mfile.m'); print $matlab <<eof; close all; clear all; clc; % write here matlab code = zeros(10) %-------------------------------------------------------------------------- eof ########################################################################### # use command when want update toolbox #system('matlab rehash toolboxcache') # use when want use java interface! # notice!! # not open files called in call_mfile.m # file. otherwise use next command! #system('matlab -nojvm -r call_mfile'); system('matlab -r call_mfile');
Comments
Post a Comment