Re: [PORTS] MATLAB mex file interface

From: "Michael A(dot) Koerber SR" <mak(at)ll(dot)mit(dot)edu>
To: reina(at)nsi(dot)edu
Cc: pgsql-ports(at)postgreSQL(dot)org
Subject: Re: [PORTS] MATLAB mex file interface
Date: 1999-06-03 22:49:59
Message-ID: 199906032251.SAA17299@ll.mit.edu
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-ports by date

  From Date Subject
Next Message G. Anthony Reina 1999-06-03 23:30:49 Re: [PORTS] MATLAB mex file interface
Previous Message G. Anthony Reina 1999-06-03 21:50:41 MATLAB mex file interface