> 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