Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

Re: OLE can't find Matlab aready running

by sanju7 (Acolyte)
on Oct 04, 2010 at 21:00 UTC ( [id://863435]=note: print w/replies, xml ) Need Help??


in reply to OLE can't find Matlab aready running

After looking at the code i can say it would only create new Matlab process if the earlier $ml getting "undef" in return. Also assuming a neat code (use my with new variable $ml use strict and warnings and also use win32::OLEs warning option to get more info on it etc)is causing the same --then the question comes to me how are you running the perl code. Unless you are running perl code from within Matlab how would perl be even aware of the existence of existing Matlab OLEs(correct me if i am wrong but its my understanding of OLEs). Unless you run Matlab from within perl like below,

#!/usr/bin/perl # use strict; use warnings; use Win32::OLE; use Win32::OLE::Variant; Win32::OLE->Option(Warn => 3); my $Count = Win32::OLE->EnumAllObjects(sub { my $Object = shift; my $Class = Win32::OLE->QueryObjectType($Object); printf "# Object=%s Class=%s\n", $Object, $Class; }); print "Found $Count OLE Object(s)\n";

If this generates any output then you can consider the approach you are trying. It would be easy by not bothering with OLE, import, say, a CSV file with Matlab import. I would probably start along that route: write a CSV file with the data you want in Perl, and then import it into matlab from the matlab macro.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://863435]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (2)
As of 2024-04-25 20:03 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found