[Top][All Lists]

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

octave and www again

From: Daniel Heiserer
Subject: octave and www again
Date: Wed, 16 Sep 1998 09:27:30 +0200

thanks for the last help, I have something that works right now in more
or least efficient versions. As things develope I also get new

1) is there a way to "talk" to octave. Assume I have a webserver which
asks octave for several things.
One thing of course is to write an octave script, execute it and get the
results. But assume I have to load 30MB of data and do some other things
too, this way is pretty slowly if you have many "questions" via your
browser to octave ("assume  rescale the plot, do multiple plots and so
on"). I have seen "swig" ( which wrapped matlab
into perl, which itself could be the browser's .cgi script. Has anybody
done the same whith octave? Is there another way?

2) automatic rename of variables. Assume I have a set of variables:
a,b,c. They are stored in a .mat file.
Now assume I have many of these .mat files all containing the same
variables, but with different values.
Now I want to plot the vector a of f1.mat and f2.mat wihtout relabeling
I can imagine something like a "hold on" and then load the stuff f1.mat,
plot it and load f2.mat (overload) and plot again.
But again: Assume the data has 50MB and I want to use both files more
often (perhaps do a logscale or not, load a third file, plot the b's
instead of the a's). It becomes again pretty inefficient to load the
crap for each request.
unfortunately I haven't seen how I can have access to octaves data. In
matlab I can do a "my_workspace=whos;". The only way I can think of in
octave is 
o       writing a diary file,
o       call a system command reading the diary file
o       and creating a octave file containing the variables names and relabel
them (relabel.m):
o       execute the relabel.m
But that is not really efficient. What I think would be a good idea is
to loop via all files calling a function which loads all the stuff and
puts all the variables in a struct which has the filename and returns
that struct.

What I would have than is:

octave:11> whos

*** local user variables:

prot  type               rows   cols  name
====  ====               ====   ====  ====
 wd   struct                -      -  f1
 wd   struct                -      -  f2
and so on.
But how can I put something in a struct as long as I don't know what is
in the file and I don't have access to my workspace variables?

any ideas?

Thanks, bye daniel

Mit freundlichen Gruessen
                                 Daniel Heiserer
Daniel Heiserer, BMW AG, Knorrstrasse 147, 80788 Muenchen
Abteilung EK-20
Tel.: 089-382-21187, Fax.: 089-382-42820

reply via email to

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