<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/rss/1.0/" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:syn="http://purl.org/rss/1.0/modules/syndication/" xmlns:admin="http://webns.net/mvcb/">
  <channel rdf:about="http://blog.gmane.org/gmane.comp.gnu.octave.general">
    <title>gmane.comp.gnu.octave.general</title>
    <link>http://blog.gmane.org/gmane.comp.gnu.octave.general</link>
    <description/>
    <syn:updatePeriod>hourly</syn:updatePeriod>
    <syn:updateFrequency>1</syn:updateFrequency>
    <syn:updateBase>1901-01-01T00:00+00:00</syn:updateBase>
    <items>
      <rdf:Seq>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.octave.general/41713"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.octave.general/41707"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.octave.general/41687"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.octave.general/41680"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.octave.general/41679"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.octave.general/41676"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.octave.general/41656"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.octave.general/41645"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.octave.general/41642"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.octave.general/41629"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.octave.general/41618"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.octave.general/41617"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.octave.general/41615"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.octave.general/41611"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.octave.general/41605"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.octave.general/41602"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.octave.general/41600"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.octave.general/41597"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.octave.general/41595"/>
        <rdf:li rdf:resource="http://comments.gmane.org/gmane.comp.gnu.octave.general/41592"/>
      </rdf:Seq>
    </items>
    <image rdf:resource="http://gmane.org/img/gmane-25t.png"/>
    <textinput rdf:resource=""/>
  </channel>
  <image rdf:about="http://gmane.org/img/gmane-25t.png">
    <title>Gmane</title>
    <url>http://gmane.org/img/gmane-25t.png</url>
    <link>http://gmane.org</link>
  </image>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.octave.general/41713">
    <title>Octave very slow accessing disk</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.octave.general/41713</link>
    <description>&lt;pre&gt;Hi,

I am (new to) running Octave 3.6.1 on Windows 7.  Various operations seem to
take an extraordinarily long time (at least versus R, with which I am more
familiar) and I am wondering if this is normal or something wrong with my
installation.  I installed Octave without changing any defaults, so I don't
think I have messed anything up.

Some examples/symptoms:

1. Typing in 'path' takes 8 seconds to return a response.  The list only
contains items in the 'C:\Program Files\Octave-3.6.1' subfolders, so it does
not seem to be searching my whole machine for folders (I attach the full
list at the end of this post) so not clear why it takes so long?

2. I have a comma separated text data file with 100 lines in it and 3
numbers per line.  The data is loaded using

data = load('ex2data1.txt');
X = data(:, [1, 2]); y = data(:, 3);

After doing the above and then typing in X to see the data values, it takes
10 seconds to start displaying them - every time I do it!  I assumed Octave
would store this data in RAM and once it was loaded it should be instantly
available - yet it seems to re-read it every time I want to access it?

3. Following from the above, strangely enough running plot(X) produces an
almost instant plot.  Yet immediately after typing in X it still takes 8
seconds to display. display(X) takes just as long.

4. The help system is very slow, taking &amp;gt;5 seconds at minimum &amp;amp; up to 30
seconds in some cases.

So it seems that anything relating to disk access is very slow?  This is all
very frustrating, so I appreciate any suggestions you can give (and please
let me know if you need more info.)

Thanks very much,
Zos

C:\Program Files\Octave-3.6.1\lib\octave\3.6.1\site\oct\i686-pc-mingw32
C:\Program Files\Octave-3.6.1\lib\octave\site\oct\api-v48+\i686-pc-mingw32
C:\Program Files\Octave-3.6.1\lib\octave\site\oct\i686-pc-mingw32
C:\Program Files\Octave-3.6.1\share\octave\3.6.1\site\m
C:\Program Files\Octave-3.6.1\share\octave\site\api-v48+\m
C:\Program Files\Octave-3.6.1\share\octave\site\m
C:\Program Files\Octave-3.6.1\share\octave\site\m\startup
C:\Program Files\Octave-3.6.1\lib\octave\3.6.1\oct\i686-pc-mingw32
C:\Program Files\Octave-3.6.1\lib\octave\3.6.1\oct\i686-pc-mingw32\QtHandles
C:\Program Files\Octave-3.6.1\share\octave\3.6.1\m
C:\Program Files\Octave-3.6.1\share\octave\3.6.1\m\audio
C:\Program Files\Octave-3.6.1\share\octave\3.6.1\m\deprecated
C:\Program Files\Octave-3.6.1\share\octave\3.6.1\m\elfun
C:\Program Files\Octave-3.6.1\share\octave\3.6.1\m\general
C:\Program Files\Octave-3.6.1\share\octave\3.6.1\m\geometry
C:\Program Files\Octave-3.6.1\share\octave\3.6.1\m\help
C:\Program Files\Octave-3.6.1\share\octave\3.6.1\m\image
C:\Program Files\Octave-3.6.1\share\octave\3.6.1\m\io
C:\Program Files\Octave-3.6.1\share\octave\3.6.1\m\linear-algebra
C:\Program Files\Octave-3.6.1\share\octave\3.6.1\m\miscellaneous
C:\Program Files\Octave-3.6.1\share\octave\3.6.1\m\optimization
C:\Program Files\Octave-3.6.1\share\octave\3.6.1\m\path
C:\Program Files\Octave-3.6.1\share\octave\3.6.1\m\pkg
C:\Program Files\Octave-3.6.1\share\octave\3.6.1\m\plot
C:\Program Files\Octave-3.6.1\share\octave\3.6.1\m\polynomial
C:\Program Files\Octave-3.6.1\share\octave\3.6.1\m\prefs
C:\Program Files\Octave-3.6.1\share\octave\3.6.1\m\set
C:\Program Files\Octave-3.6.1\share\octave\3.6.1\m\signal
C:\Program Files\Octave-3.6.1\share\octave\3.6.1\m\sparse
C:\Program Files\Octave-3.6.1\share\octave\3.6.1\m\specfun
C:\Program Files\Octave-3.6.1\share\octave\3.6.1\m\special-matrix
C:\Program Files\Octave-3.6.1\share\octave\3.6.1\m\startup
C:\Program Files\Octave-3.6.1\share\octave\3.6.1\m\statistics
C:\Program Files\Octave-3.6.1\share\octave\3.6.1\m\statistics\base
C:\Program Files\Octave-3.6.1\share\octave\3.6.1\m\statistics\distributions
C:\Program Files\Octave-3.6.1\share\octave\3.6.1\m\statistics\models
C:\Program Files\Octave-3.6.1\share\octave\3.6.1\m\statistics\tests
C:\Program Files\Octave-3.6.1\share\octave\3.6.1\m\strings
C:\Program Files\Octave-3.6.1\share\octave\3.6.1\m\testfun
C:\Program Files\Octave-3.6.1\share\octave\3.6.1\m\time

--
View this message in context: http://octave.1599824.n4.nabble.com/Octave-very-slow-accessing-disk-tp4630173.html
Sent from the Octave - General mailing list archive at Nabble.com.
&lt;/pre&gt;</description>
    <dc:creator>zos474</dc:creator>
    <dc:date>2012-05-26T06:57:46</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.octave.general/41707">
    <title>Are package folder supported?</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.octave.general/41707</link>
    <description>&lt;pre&gt;Hi,

I'd like to run some Matlab code with package folders (folders like
'+packageName')

http://www.mathworks.de/help/techdoc/matlab_oop/brfynt_-1.html

It seems that this doesn't work in octave 3.2.4.

Is there a workarround or description about this issue, I couldn't
find anything about this via google?

Thanks

Jakob
&lt;/pre&gt;</description>
    <dc:creator>Jakob Lombacher</dc:creator>
    <dc:date>2012-05-25T08:39:53</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.octave.general/41687">
    <title>Lomb-Scargle variant</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.octave.general/41687</link>
    <description>&lt;pre&gt;I have been following Ben_Zen's blog and thought I'd point him to this variant of LB-SCGL:

Hi Ben,

Thought I'd pass this along, a variant of Lomb-Scargle, by M.Zechmeister at the Max-Planck Institute.  The downloadable .pdf can be found here:

http://arxiv.org/abs/0901.2573

it's also sprinkled around the web if you search on his name,

On another site that I have lost track of, but have partially printed off, he offers to give away the source code.  His email is listed as zechmeister&amp;lt; at &amp;gt;mpia.de, assuming it hasn't changed...He seems very willing to help with implementations of it...

He makes these claims for it:

"The Lomb-Scargle periodogram is a common tool in the frequency analysis of unequally spaced data equivalent to least-squares fitting of sine waves. We give an analytic solution for the generalisation to a full sine wave fit, including an offset and weights ($\chi^{2}$ fitting). Compared to the Lomb-Scargle periodogram, the generalisation is superior as it provides more accurate frequencies, is less susceptible to aliasing, and gives a much better determination of the spectral intensity. Only a few modifications are required for the computation and the computational effort is similar. Our approach brings together several related methods that can be found in the literature, viz. the date-compensated discrete Fourier transform, the floating-mean periodogram, and the "spectral significance" estimator used in the SigSpec program, for which we point out some equivalences."

Hope that's helpful,
Regards,
Mark Lytle
Houston
_______________________________________________
Help-octave mailing list
Help-octave&amp;lt; at &amp;gt;octave.org
https://mailman.cae.wisc.edu/listinfo/help-octave
&lt;/pre&gt;</description>
    <dc:creator>Mark Lytle</dc:creator>
    <dc:date>2012-05-24T13:06:27</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.octave.general/41680">
    <title>Bug with struct, setfield</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.octave.general/41680</link>
    <description>&lt;pre&gt;Has anyone else seen this bug with setfield? It seems to work properly, but
when I check if the field is set with isfield, it does not work.

I'm using the brew install of GNU Octave, version 3.6.1


octave&amp;gt; s = struct()
_______________________________________________
Help-octave mailing list
Help-octave&amp;lt; at &amp;gt;octave.org
https://mailman.cae.wisc.edu/listinfo/help-octave
&lt;/pre&gt;</description>
    <dc:creator>Jacob Eggers</dc:creator>
    <dc:date>2012-05-22T15:58:34</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.octave.general/41679">
    <title>Windows-1-1.0.tar.gz</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.octave.general/41679</link>
    <description>&lt;pre&gt;I'm running GNU Octave, version 3.6.1 on Cygwin on Windows 7 and need to be
able to use the xlsread function.  As such, I've installed io-1.0.18, but
when attempting to install the windows-1.1.0 package, I get some errors:
Makefile:27: recipe for target `__COM__.oct' failed
make: Leaving directory `/tmp/oct-28a03c.2/Windows/src'
error: called from `pkg&amp;gt;configure_make' in file
/usr/share/octave/3.6.1/m/pkg/pkg.m near line 1385, column 9
error: called from:
error:   /usr/share/octave/3.6.1/m/pkg/pkg.m at line 827, column 5
error:   /usr/share/octave/3.6.1/m/pkg/pkg.m at line 383, column 9

As a result, the xlsread does not yet function.
Any ideas would be much appreciated.

Thanks,


--
View this message in context: http://octave.1599824.n4.nabble.com/Windows-1-1-0-tar-gz-tp4630115.html
Sent from the Octave - General mailing list archive at Nabble.com.
&lt;/pre&gt;</description>
    <dc:creator>Rtupper</dc:creator>
    <dc:date>2012-05-23T21:04:54</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.octave.general/41676">
    <title>Extracting matrix rows that meet a condition</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.octave.general/41676</link>
    <description>&lt;pre&gt;Hi!
I am pretty new to Octave and at the moment I have a problem that I cannot
find a solution to.
Basically I am working with a matrix that is three columns wide and is over
a thousand rows long.
What I need to do is to extract the rows that contain numbers that are
either x &amp;lt; 0 or x &amp;gt; 1 and
write those intact to a new *.txt file.
Thank you in advance for any help!

Knof

--
View this message in context: http://octave.1599824.n4.nabble.com/Extracting-matrix-rows-that-meet-a-condition-tp4630112.html
Sent from the Octave - General mailing list archive at Nabble.com.
&lt;/pre&gt;</description>
    <dc:creator>Knof</dc:creator>
    <dc:date>2012-05-23T19:51:17</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.octave.general/41656">
    <title>wrong message about non-existing file and strange file permissions indataframe-0.9.1 package</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.octave.general/41656</link>
    <description>&lt;pre&gt;Hello,

I've tried (for no good reason) to run a recently shown in this list example, and here's what I see:


"

octave:1&amp;gt; sys1=tf(1,[1 3 2])
error: no such file, `/mnt/sdb8/sergei/AFSWD_debug/20120424/octave-3.6.1/share/octave/packages/dataframe-0.9.1/&amp;lt; at &amp;gt;dataframe/size.m'
error: evaluating argument list element number 1
error: called from:
error:   /mnt/sdb8/sergei/AFSWD_debug/20120424/octave-3.6.1/share/octave/3.6.1/m/general/private/__isequal__.m at line 70, column 9
error:   /mnt/sdb8/sergei/AFSWD_debug/20120424/octave-3.6.1/share/octave/3.6.1/m/general/isequal.m at line 31, column 10
error:   /mnt/sdb8/sergei/AFSWD_debug/20120424/octave-3.6.1/share/octave/packages/control-2.3.50/__labels__.m at line 31, column 3
error:   /mnt/sdb8/sergei/AFSWD_debug/20120424/octave-3.6.1/share/octave/packages/control-2.3.50/&amp;lt; at &amp;gt;tf/display.m at line 30, column 16
octave:1&amp;gt; system("ls -ltr /mnt/sdb8/sergei/AFSWD_debug/20120424/octave-3.6.1/share/octave/packages/dataframe-0.9.1/&amp;lt; at &amp;gt;dataframe/size.m");
-rw------- 1 qemu users 2264 May 22 21:55 /mnt/sdb8/sergei/AFSWD_debug/20120424/octave-3.6.1/share/octave/packages/dataframe-0.9.1/&amp;lt; at &amp;gt;dataframe/size.m
octave:2&amp;gt; 

".

I.e., first of all, instead of "no such file" there should be "can not open file for reading".

Secondly, all but .m files of dataframe-0.9.1 have the correct permissions:

-rw-r--r-- 1 qemu users   306 2010-11-10 10:42 dataframe/inst/&amp;lt; at &amp;gt;dataframe/isempty.m
-rw-r--r-- 1 qemu users   274 2010-12-13 11:40 dataframe/inst/&amp;lt; at &amp;gt;dataframe/ndims.m


has the correct permissions, all other .m files have the wrong "-rw-------" permissions.


Because of this problem dataframe-0.9.1 package is unusable when installed globally.


Regards,
  Sergei.
&lt;/pre&gt;</description>
    <dc:creator>Sergei Steshenko</dc:creator>
    <dc:date>2012-05-22T20:29:18</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.octave.general/41645">
    <title>I am finding a crash with sys1=tf(1,[1 3 2])</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.octave.general/41645</link>
    <description>&lt;pre&gt;Could someone try this with 3.7.0+
I am finding a crash with
sys1=tf(1,[1 3 2])

You will need the control pkg.


&lt;/pre&gt;</description>
    <dc:creator>Doug Stewart</dc:creator>
    <dc:date>2012-05-22T18:14:54</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.octave.general/41642">
    <title>How to print this function?</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.octave.general/41642</link>
    <description>&lt;pre&gt;Hi, 

This is a beginner question, but can't seem to figure this out.

Please consider:

 t = [-1:0.1:1;]

f = ( 1 + t ) / ( 1 - t);

plot (t, f);


I'd like to see the behavior of f function regarding t values, but all I get
is some point.
How should I do this?

Luis

--
View this message in context: http://octave.1599824.n4.nabble.com/How-to-print-this-function-tp4630076.html
Sent from the Octave - General mailing list archive at Nabble.com.
&lt;/pre&gt;</description>
    <dc:creator>lib1</dc:creator>
    <dc:date>2012-05-22T16:58:36</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.octave.general/41629">
    <title>Applying a function to selected element type in a mixed-type cellarray</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.octave.general/41629</link>
    <description>&lt;pre&gt;Suppose a cell array like:

arr = {10, int32(15), 'Txt'; '', 25, true; NaN, 'String', single(100)}

How can all numeric values efficiently (w/o for loops etc.) be converted 
to double, leaving the other cell array contents untouched?

Getting at something like  "arr(find (cellfun ("isnumeric", [arr])))" is 
easy enough, but the follow-up is a hazy to me.

Thanks,

Philip
&lt;/pre&gt;</description>
    <dc:creator>Philip Nienhuis</dc:creator>
    <dc:date>2012-05-21T21:43:36</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.octave.general/41618">
    <title>set the default work directory when lauching Octave</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.octave.general/41618</link>
    <description>&lt;pre&gt;the current default work directory in Octave is "C:\Users\zhiming" in my PC,
and everytime i have to manually change it to 'E:\Work\Octave' after
lauching Octave.
So how can i make this tiring work automatically done, in other words, make
"E:\Work\Octave' as Octave's default work directory?

--
View this message in context: http://octave.1599824.n4.nabble.com/set-the-default-work-directory-when-lauching-Octave-tp4630010.html
Sent from the Octave - General mailing list archive at Nabble.com.
&lt;/pre&gt;</description>
    <dc:creator>Zhiming</dc:creator>
    <dc:date>2012-05-21T17:56:24</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.octave.general/41617">
    <title>Mathematics</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.octave.general/41617</link>
    <description>&lt;pre&gt;Anybody can help to make the algorithms? I could not understand the program
completely, and will soon have to take them. Programs that need to take:

1) The iterative method (simple or Seidel iteration)
2) The method of least squares (inconsistent system)
3) The nonlinear equations (the dichotomy, the method of chords, tangents to
choose from)
4) Interpolation or approximation of (any of these methods)

--
View this message in context: http://octave.1599824.n4.nabble.com/Mathematics-tp4629982.html
Sent from the Octave - General mailing list archive at Nabble.com.
&lt;/pre&gt;</description>
    <dc:creator>misha</dc:creator>
    <dc:date>2012-05-21T10:32:29</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.octave.general/41615">
    <title>debug mode readline support?</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.octave.general/41615</link>
    <description>&lt;pre&gt;Hi,

I've noticed that when I get thrown into debug mode (e.g. by pressing
Control-C while a pause is active) there is no readline support (e.g.
up-arrow and control-R for command history access  and TAB completion
don't work anymore). Also, if I press control-C a couple of times
more, octave aborts with

panic: Interrupt -- stopping myself...
attempting to save variables to `octave-core'...
save to `octave-core' complete

which seems rather silly. Is this default behavior or an anomaly on my side?

Stable branch built from source, 64-bit CPU,

debug_on_interrupt (true);

set in octaverc.


&lt;/pre&gt;</description>
    <dc:creator>Dan Muresan</dc:creator>
    <dc:date>2012-05-21T15:06:09</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.octave.general/41611">
    <title>problem with local packages taking precedence over global and (anapparent) solution</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.octave.general/41611</link>
    <description>&lt;pre&gt;Hello,

this is regarding functionality of 'octave-3.6.1/scripts/pkg/pkg.m' file.

After installing packages both locally and globally I've noticed that both global and local packages were listed by 'pkg list', and they were both listed as autoloaded.

I did request autoloading in both cases, so it is not a problem, the problem is that both local and global - if I understand correctly, local packages should take precedence.

Looking into 'octave-3.6.1/scripts/pkg/pkg.m' file contents I came to the conclusion (thanks to the comment) I came to the conclusion that the desired functionality is supposed to be implemented by line #1988..2004:



   1972 function [out1, out2] = installed_packages (local_list, global_list)
   1973   ## Get the list of installed packages.
   1974   try
   1975     local_packages = load (local_list).local_packages;
   1976   catch
   1977     local_packages = {};
   1978   end_try_catch
   1979   try
   1980     global_packages = load (global_list).global_packages;
   1981   catch
   1982     global_packages = {};
   1983   end_try_catch
   1984   installed_pkgs_lst = {local_packages{:}, global_packages{:}};
   1985
   1986   ## Eliminate duplicates in the installed package list.
   1987   ## Locally installed packages take precedence.
   1988   dup = [];
   1989   for i = 1:length (installed_pkgs_lst)
   1990     if (find (dup, i))
   1991       continue;
   1992     endif
   1993     for j = (i+1):length (installed_pkgs_lst)
   1994       if (find (dup, j))
   1995         continue;
   1996       endif
   1997       if (strcmp (installed_pkgs_lst{i}.name, installed_pkgs_lst{j}.name))
   1998         dup = [dup, j];
   1999       endif
   2000     endfor
   2001   endfor
   2002   if (! isempty(dup))
   2003     installed_pkgs_lst(dup) = [];
   2004   endif

.

Alas, inserting diagnostic prints I verified that after the code is executed, the duplicates (i.e. local and global packages with the same name) are still there.


I tried to understand the logic of the code, but failed. So I simply rewrote the piece of code, and it seems to work OK now. Here's how the code looks now:


function [out1, out2] = installed_packages (local_list, global_list)
  ## Get the list of installed packages.
  try
    local_packages = load (local_list).local_packages;
  catch
    local_packages = {};
  end_try_catch
  try
    global_packages = load (global_list).global_packages;
  catch
    global_packages = {};
  end_try_catch

  #  ## Eliminate duplicates in the installed package list.
  #  ## Locally installed packages take precedence.

  installed_pkgs_lst = local_packages;

  for global_pkg_num = 1:length(global_packages)
    global_pkg_is_not_a_local_duplicate = 1;

    for local_pkg_num = 1:length(local_packages)
      if(strcmp(local_packages{local_pkg_num}.name, global_packages{global_pkg_num}.name))
        global_pkg_is_not_a_local_duplicate = 0;
        break;
      endif
    endfor

    if(global_pkg_is_not_a_local_duplicate)
      installed_pkgs_lst = {installed_pkgs_lst{:}, global_packages{global_pkg_num}};
    endif
  endfor

.

The code is simpler, and is as bad O(N ^ 2)) as the original one, but for less than 100 packages currently available the computational complexity doesn't matter.


My currently used version of 'pkg.m' file ('pkg.m.20120521.gz') with this and other fixes is attached.


Among other fixes:

1) locally installed packaged are under ~/octave-X.Y.Z directory and _not_ under ~/octave directory =&amp;gt; no more clashes/unpredictable behavior because of old version packages;


2) likewise, list of locally installed packages is in ~/.octave_packages-X.Y.Z file and _not_ in ~/.octave_packages file.


Regards,
  Sergei._______________________________________________
Help-octave mailing list
Help-octave&amp;lt; at &amp;gt;octave.org
https://mailman.cae.wisc.edu/listinfo/help-octave
&lt;/pre&gt;</description>
    <dc:creator>Sergei Steshenko</dc:creator>
    <dc:date>2012-05-21T09:28:11</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.octave.general/41605">
    <title>Permission denied installing package</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.octave.general/41605</link>
    <description>&lt;pre&gt;Hello

Installing a package in Octave-3.6.1for Windows VS2010 I get the following
error:

couldn´t create installation directory ...3.6.1\m\pkg\pkg.m : Permission
denied

error: called from 'pkg&amp;gt;copy_files' in file ...3.6.1\m\pkg\pkg.m near line
1563, column 7

error: called from:

error: ...\3.6.1\m\pkg\pkg.m at line 869, column 5

error: ...\3.6.1\m\pkg\pkg.m at line 383, column 9

Thanks for any help.

--
View this message in context: http://octave.1599824.n4.nabble.com/Permission-denied-installing-package-tp4629967.html
Sent from the Octave - General mailing list archive at Nabble.com.
_______________________________________________
Help-octave mailing list
Help-octave&amp;lt; at &amp;gt;octave.org
https://mailman.cae.wisc.edu/listinfo/help-octave
&lt;/pre&gt;</description>
    <dc:creator>benes</dc:creator>
    <dc:date>2012-05-21T01:04:49</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.octave.general/41602">
    <title>strange message while installing tsa-4.2.4.tar.gz package</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.octave.general/41602</link>
    <description>&lt;pre&gt;Hello,

while installing tsa-4.2.4.tar.gz package I've noticed the following strange messages:


make: /usr/local/MATLAB/R2010b/bin/mexext: Command not found
make: Entering directory `/mnt/sdb8/sergei/AFSWD_debug/build/octave_forge_bundle/oct-eXZ1Jq/tsa/src'
make: /usr/local/MATLAB/R2010b/bin/mexext: Command not found
make: Nothing to be done for `mex4o'.
...
/home/qemu/octave-3.6.1/tsa-4.2.4/i686-pc-linux-gnu-api-v48+/covm_mex.mex: failed to load: /home/qemu/octave-3.6.1/tsa-4.2.4/i686-pc-linux-gnu-api-v48+/covm_mex.mex: wrong ELF class: ELFCLASS64
.

Any idea what this all can be ?

I.e., for example, why Matlab is called during Octave package installation ?

What is that "ELFCLASS64" ? My machine is a 32 bit one.

Thanks,
  Sergei.
&lt;/pre&gt;</description>
    <dc:creator>Sergei Steshenko</dc:creator>
    <dc:date>2012-05-20T21:38:31</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.octave.general/41600">
    <title>regexp: how to split a cellstr array into substring arrays, eachmatching regular expressions</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.octave.general/41600</link>
    <description>&lt;pre&gt;Having a cellstr array like this:

octave:178&amp;gt; ar = {'abcdefguvwxAny' ; 'acegxyzTrailing'; 'vxzJunk'}
ar =
{
   [1,1] = abcdefguvwxAny
   [2,1] = acegxyzTrailing
   [3,1] = vxzJunk
}

how can I efficiently split it into two columns using regular 
expressions like
'[abcdefg]'  and  '[uvwxyz]'

to obtain

{ 'abcdefg', 'uvwxAny'; 'acegTrailing', 'xyz'; '', 'vxzJunk'}  ?

IOW, I'd like to split the cellstr array at the location where 
'[uvwxyz]' matches (even if not present, see far below).


The closest I get is:

## Invert pattern and use 'split' keyword
octave:179&amp;gt; ss = regexp (ar, '[^abcdefg]', 'split')
ss =
{
   [1,1] =
   {
     [1,1] = abcdefg
     [1,2] =
     [1,3] =
     [1,4] =
     [1,5] =
     [1,6] =
     [1,7] =
     [1,8] =
   }
   [2,1] =
   {
     [1,1] = aceg
     [1,2] =
     [1,3] =
     [1,4] =
     [1,5] =
     [1,6] = a
     [1,7] =
     [1,8] =
     [1,9] =
     [1,10] = g
   }
   [3,1] =
   {
     [1,1] =
     [1,2] =
     [1,3] =
     [1,4] =
     [1,5] =
     [1,6] =
     [1,7] =
     [1,8] =
   }
}
octave:180&amp;gt; col1 = cellfun (&amp;lt; at &amp;gt;(x) x{1}, {ss{:}}, 'uni', false)
col1 =
{
   [1,1] = abcdefg
   [1,2] = aceg
   [1,3] =
}
octave:181&amp;gt; col2 = regexp (ar, '[uvwxyz].*', 'match', 'once')
tt =
{
   [1,1] = uvwxAny
   [2,1] = xyzTrailing
   [3,1] = vxzJunk
}

## ...or the latter statement, perhaps more robust, as:
octave:182&amp;gt; tt = regexp (ar, '[uvwxyz].*', 'match')
tt =
{
   [1,1] =
   {
     [1,1] = uvwxAny
   }
   [2,1] =
   {
     [1,1] = xyzTrailing
   }
   [3,1] =
   {
     [1,1] = vxzJunk
   }
}
octave:183&amp;gt; col2 = cellfun (&amp;lt; at &amp;gt;(x) [x{:}], {tt{:}}, 'Uni', false)
tt =
{
   [1,1] = uvwxAny
   [1,2] = xyzTrailing
   [1,3] = vxzJunk
}
octave:184&amp;gt;


( cellfun() was invoked to be able to use repeated indexing; I couldn't 
find another way to extract the first/last entries of ss and tt. )
I think my method isn't very robust.
So I hope there's a less convoluted and more reliable way.


BTW,
octave:184&amp;gt; ar = {'abcdefguvwxAny' ; 'acegxyzTrailing'; 'aJunk'}
ar =
{
   [1,1] = abcdefguvwxAny
   [2,1] = acegxyzTrailing
   [3,1] = Junk
}
octave:186&amp;gt; tt = regexp (ar, '[uvwxyz].*', 'match', 'once')
tt =
{
   [1,1] = uvwxAny
   [2,1] = xyzTrailing
   [3,1] = unk
}

=&amp;gt; is this a bug? (swallowing the "J" from the last entry)

Thanks,

Philip
&lt;/pre&gt;</description>
    <dc:creator>Philip Nienhuis</dc:creator>
    <dc:date>2012-05-20T20:00:53</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.octave.general/41597">
    <title>Another problem with GraphicsMagick-1.3.12</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.octave.general/41597</link>
    <description>&lt;pre&gt;I can´t do a thing with my image files. I discovered that:

The GraphicsMagick-1.3.12 folder of my installation contains just a folder
named "config". This folder 

contains the following files: "colors.mgk", "log.mgk" and "modules.mgk". Is
this right?  

The GraphicgMagick-1.3.15 of another installation contains a lot of folders
and files. 

Thanks for any help.


--
View this message in context: http://octave.1599824.n4.nabble.com/Another-problem-with-GraphicsMagick-1-3-12-tp4629955.html
Sent from the Octave - General mailing list archive at Nabble.com.
_______________________________________________
Help-octave mailing list
Help-octave&amp;lt; at &amp;gt;octave.org
https://mailman.cae.wisc.edu/listinfo/help-octave
&lt;/pre&gt;</description>
    <dc:creator>benes</dc:creator>
    <dc:date>2012-05-20T17:12:51</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.octave.general/41595">
    <title>fltk epslatex print problem</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.octave.general/41595</link>
    <description>&lt;pre&gt;Good day.

I have just got 3.6.1 working on ubuntu through the via the ppa method but
I am having trouble with printing(saving) a plot. I need to use the fltk
backend but when trying the following code the .tex file does not seem to
work.

graphics_toolkit fltk
plot(rand(3))
print -depslatex foo

This generates two files, the foo.tex and foo-inc.eps, however the foo.tex
does not refer to the foo-inc.eps. Using gnuplot the tex file uses the (In
gnuplot's case) foo.eps. Is this my system causing the problem? Oh, I need
to use fltk for the way it handles the fill plot type.

On a similar topic, how does one set the default backend to fltk?

Thanks in advance.

&lt;/pre&gt;</description>
    <dc:creator>Grant Stephens</dc:creator>
    <dc:date>2012-05-20T13:41:16</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.octave.general/41592">
    <title>why global_install is assumed to be 'true' in 'load_packages' and whyit doesn't matter ?</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.octave.general/41592</link>
    <description>&lt;pre&gt;Hello,

trying to debug some problems in package installation (I'm talking about octave-3.6.1/scripts/pkg/pkg.m file in the source tree) I've noticed a couple functions.

The first of them is 'load_packages':

   2105 function load_packages (files, handle_deps, local_list, global_list)
   2106   installed_pkgs_lst = installed_packages (local_list, global_list);
   2107   num_packages = length (installed_pkgs_lst);
   2108
   2109   ## Read package names and installdirs into a more convenient format.
   2110   pnames = pdirs = cell (1, num_packages);
   2111   for i = 1:num_packages
   2112     pnames{i} = installed_pkgs_lst{i}.name;
   2113     pdirs{i} = installed_pkgs_lst{i}.dir;
   2114   endfor
   2115
   2116   ## Load all.
   2117   if (length (files) == 1 &amp;amp;&amp;amp; strcmp (files{1}, "all"))
   2118     idx = [1:length(installed_pkgs_lst)];
   2119   ## Load auto.
   2120   elseif (length (files) == 1 &amp;amp;&amp;amp; strcmp (files{1}, "auto"))
   2121     idx = [];
   2122     for i = 1:length (installed_pkgs_lst)
   2123       if (exist (fullfile (pdirs{i}, "packinfo", ".autoload"), "file"))
   2124         idx (end + 1) = i;
   2125       endif
   2126     endfor
   2127   ## Load package_name1 ...
   2128   else
   2129     idx = [];
   2130     for i = 1:length (files)
   2131       idx2 = find (strcmp (pnames, files{i}));
   2132       if (! any (idx2))
   2133           error ("package %s is not installed", files{i});
   2134       endif
   2135       idx (end + 1) = idx2;
   2136     endfor
   2137   endif
   2138
   2139   ## Load the packages, but take care of the ordering of dependencies.
   2140   load_packages_and_dependencies (idx, handle_deps, installed_pkgs_lst, true);
   2141 endfunction
.

As one can see, on line #2140 'load_packages_and_dependencies' function is called, and its last argument is set to 'true'.


The 'load_packages_and_dependencies' function looks this way:


   2328 function load_packages_and_dependencies (idx, handle_deps, installed_pkgs_lst,
   2329                                          global_install)
   2330   idx = load_package_dirs (idx, [], handle_deps, installed_pkgs_lst);
   2331   dirs = {};
   2332   execpath = EXEC_PATH ();
   2333   for i = idx;
   2334     ndir = installed_pkgs_lst{i}.dir;
   2335     dirs{end+1} = ndir;
   2336     if (exist (fullfile (dirs{end}, "bin"), "dir"))
   2337       execpath = cstrcat (execpath, pathsep (), fullfile (dirs{end}, "bin"));
   2338     endif
   2339     tmpdir = getarchdir (installed_pkgs_lst{i});
   2340     if (exist (tmpdir, "dir"))
   2341       dirs{end + 1} = tmpdir;
   2342       if (exist (fullfile (dirs{end}, "bin"), "dir"))
   2343         execpath = cstrcat (execpath, pathsep (), fullfile (dirs{end}, "bin"));
   2344       endif
   2345     endif
   2346   endfor
   2347
   2348   ## Load the packages.
   2349   if (length (dirs) &amp;gt; 0)
   2350     addpath (dirs{:});
   2351   endif
   2352
   2353   ## Add the binaries to exec_path.
   2354   if (! strcmp (EXEC_PATH, execpath))
   2355     EXEC_PATH (execpath);
   2356   endif
   2357 endfunction

.

In the body of 'load_packages_and_dependencies' I see that the last argument is called 'global_install'.

Which means that 'load_packages' calls 'load_packages_and_dependencies' with global_install == true.

So, my first question is: "Why ?".

Looking more carefully at 'load_packages_and_dependencies' body, I see 'global_install' _nowhere_. Am I missing it ?

If not, my second question is: "Why 'global_install' is not used ?".


Thanks,
  Sergei.
&lt;/pre&gt;</description>
    <dc:creator>Sergei Steshenko</dc:creator>
    <dc:date>2012-05-20T01:40:57</dc:date>
  </item>
  <item rdf:about="http://comments.gmane.org/gmane.comp.gnu.octave.general/41591">
    <title>plotyy broken in 3.6.1?</title>
    <link>http://comments.gmane.org/gmane.comp.gnu.octave.general/41591</link>
    <description>&lt;pre&gt;Greetings,

I am having an issue when using 'plotyy()' in a subplot.  When I plot
something in a subplot of a figure and then attempt to plotyy() into another
subplot of that figure the correct y-axes are displayed, but only one of the
two curves is displayed.  I can sometimes see the other curve flash in the
subplot I am plotyy()-ing to but it immediately disappears when the second
curve is displayed.  The following test code seems to reproduce the issue
for me:

   clear
   figure(1)
   clf

   t=[0:1/1000:1];
   x=sin(2*pi*t);
   y=5*cos(2*pi*t);

   figure(1);
   subplot(3,1,1);
   hold on
   title('x(t)')
   plot(t,x);

   subplot(3,1,2)
   hold on
   title('y(y)')
   plot(t,y);

   subplot(3,1,3)
   hold on
   title('x(t), y(y)')
   plotyy(t,x,t,y);

Here is what I see when I run this:
http://octave.1599824.n4.nabble.com/file/n4629948/Screen_shot_2012-05-19_at_7.41.57_PM.png 

What I expect to see is both x(t) and y(t) plotted together in
subplot(3,1,3), each with its own y-axis.

If I don't use subplots plotyy() seems to work OK.

Am I doing something wrong or is plotyy() broken in 3.6.1?

Octave 3.6.1 from Homebrew
OS X 10.6.8

--
View this message in context: http://octave.1599824.n4.nabble.com/plotyy-broken-in-3-6-1-tp4629948.html
Sent from the Octave - General mailing list archive at Nabble.com.
&lt;/pre&gt;</description>
    <dc:creator>notMyUsername</dc:creator>
    <dc:date>2012-05-19T23:54:03</dc:date>
  </item>
  <textinput rdf:about="http://search.gmane.org/?group=$group=gmane.comp.gnu.octave.general">
    <title>Search Engine</title>
    <description>Search the mailing list at Gmane</description>
    <name>query</name>
    <link>http://search.gmane.org/?group=$group=gmane.comp.gnu.octave.general</link>
  </textinput>
</rdf:RDF>

