help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Saving symbolic variables in a database


From: Doug Stewart
Subject: Re: Saving symbolic variables in a database
Date: Wed, 9 Mar 2016 23:20:43 -0500



On Wed, Mar 9, 2016 at 1:05 PM, diego9j <address@hidden> wrote:
Hi,

First of all, I might be a little bit colloquial in my explanations (I
recently started programming in Octave), but I hope that there's no problem
in that.

As a part of a bigger project, I need to store a symbolic variable (from
symbolic package) into a postgres database (with database package). I got
one idea of how to do it but I'm having some trouble that I can't solve, so
both new ideas and solutions for my problem are welcome.

Since there's no "direct" way of storing symbolic variables in postgres, I
thought about storing the binary data of the variable, something like:

binary_data=save("-binary","-","symbolic_variable_name");
8bit_data=uint8(binary_data);

Then I store it with pq_exec_params as bytea postgres type. The problem is
that
1 - I found no function to parse back from 8-bit to binary
2 - I don't know how to make that binary data a variable again

When doing simple file i/o, you save the binary to a file and then with the
"load" function, the variable "pops out" again, but I don't know how to do
that with an octave string.


As I said, anything that helps me will be greatly appreciated, I'm really
stuck with this...

Best regards
Diego



--
View this message in context: http://octave.1599824.n4.nabble.com/Saving-symbolic-variables-in-a-database-tp4675312.html
Sent from the Octave - General mailing list archive at Nabble.com.

_______________________________________________
Help-octave mailing list
address@hidden
https://lists.gnu.org/mailman/listinfo/help-octave



Would anything onĀ http://wiki.octave.org/Symbolic_package
help you?
 ff=function_handle(rhs(f))

--
DAS


reply via email to

[Prev in Thread] Current Thread [Next in Thread]