Re: [PORTS] MATLAB mex file interface - Mailing list pgsql-ports

From Michael A. Koerber SR
Subject Re: [PORTS] MATLAB mex file interface
Date
Msg-id 199906032251.SAA17299@ll.mit.edu
Whole thread Raw
In response to MATLAB mex file interface  ("G. Anthony Reina" <reina@nsi.edu>)
List pgsql-ports
> Has anyone ever tried creating a MATLAB mex file (UNIX-based) to access
> the PostgreSQL database from MATLAB?
>
> -Tony Reina

I don't know, but Matlab does have a database access toolbox that you
might check out.

For my work, I just use a matlab shell command and PSQL.  E.g.,

> % Create command
> cmd = sprintf('!psql -d %s %s -c "%s" > %s', Data_Base_Name, PSQ_OPTIONS, SQL_command, Temp_File_Name);
> eval(cmd)
> cmd = sprintf('my_data = load(%s)',Temp_File_Name);
> eval(cmd)
>
> % Now work with the data in my_data...

Just pick the right options to get the type of delimiting you want.  In some cases
I've created Perl Scripts (functions) which are called using Pg.pm...but these
are tougher problems than a simple "select" command, perhaps joins and such.

I feel this is the quickest and lowest cost solution...unless a MEX file is ready
for download...


mike

--
Dr Michael A. Koerber
MIT/LL
Radar Imaging Techniques

pgsql-ports by date:

Previous
From: "G. Anthony Reina"
Date:
Subject: MATLAB mex file interface
Next
From: "G. Anthony Reina"
Date:
Subject: Re: [PORTS] MATLAB mex file interface