Re: [PORTS] MATLAB mex file interface

Поиск
Список
Период
Сортировка
От Michael A. Koerber SR
Тема Re: [PORTS] MATLAB mex file interface
Дата
Msg-id 199906032251.SAA17299@ll.mit.edu
обсуждение исходный текст
Ответ на MATLAB mex file interface  ("G. Anthony Reina" <reina@nsi.edu>)
Список 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 по дате отправления:

Предыдущее
От: "G. Anthony Reina"
Дата:
Сообщение: MATLAB mex file interface
Следующее
От: "G. Anthony Reina"
Дата:
Сообщение: Re: [PORTS] MATLAB mex file interface