Lukas Reichlin | 10 Feb 08:10
Picon

How to combine several functions in a single oct-file?

Dear Octave community,

I noticed that "which arrayfun" points to cellfun.oct (octave 3.6.0). This means that both arrayfun and
cellfun are stored in a single oct-file. Now I wonder how octave knows that it finds arrayfun in
cellfun.oct? Does octave load all oct-files on startup? I thought that a function "foo" has to be located
in foo.m, foo.oct or in the same m-file as the calling function.

Background: My control package has dozens of oct-files and I like to combine them in just a few oct-files.
They all use the SLICOT Fortran library and I compiled the required parts of it into every single oct-file.
I think it would be better if the Fortran code would be stored in one big oct-file that offers all the user
functions. Like cellfun.oct.

Thanks for any insights and best regards,
Lukas
Matyas Sustik | 10 Feb 07:41
Picon
Gravatar

Ctrl-C in MEX file

Hi All,

When I hit Ctrl-C (on linux) during a MEX file execution, first
nothing happens, then second time
I get a:
"Press Control-C again to abort."
message.

Another Ctrl-C will abort octave.  It would be more convenient if only
my program were aborted and octave would keep running with my
environment preserved.  Is that feasible?  Is there a setting that
would get that behaviour?

Thanks!
-Matyas
R C | 10 Feb 04:39
Picon
Favicon

jamesebailey


Hey!!! Ann sends you her kindest regards!
http://espacoiriya.com.br/home/iiinamen.php?exofreepage=90

            Fri, 10 Feb 2012 4:39:34
__________________
"And Caleb, thinking, as he did, that he was in great danger from the cow, if he had thought of my command at
all, he would have done perfectly right to have considered so extraordinary a case an exception, and so
have retreated towards the brook, notwithstanding my commands." (c) Jennifferlee vortexa5a
François Bissey | 10 Feb 02:16
Picon
Picon
Favicon

octave on IBM aix

Hi,

I rying to get octave to compile and work on a power7 cluster
running IBM Aix 6.1.
I have had some success in the past with octave-3.0.6 and the
IBM compiler on power5 hardware.
I am trying to use IBM XL compiler for the task, that's what worked
before for octave 3.0.6. That was the latest version of octave I could
compile with the compiler I had available. Building a correct gcc and
especially g++ is quite difficult on Aix, this is why I am sticking
as much as possible with XL. 

So far I bumped into two issues:
I cannot build a shared library version. This is because even when
I specify --enable-link-all-dependencies in configure, blas and lapack
are not included when linking the shared version of libcruft (there is
also the small issue of symbol duplication of xerbla between libcruft
and blas/lapack - XL doesn't like symbol duplication at all).

The second issue is more serious in my opinion. The following lines
from dNDArray.h CNDArray.h fNDArray.h and fCNDArray.h:
  boolNDArray isnan (void) const;
  boolNDArray isinf (void) const;
  boolNDArray isfinite (void) const;

get expanded during the preprocessing stage to something the compiler
ultimately think is wrong when trying to produce the object. After 
preprocessing it looks like this:
   boolNDArray ((1) ? ((sizeof(void) == sizeof(float)) ? _isnanf(void) : 
_isnan(void)) : (0)) const;
(Continue reading)

Martin, Cary | 9 Feb 18:28
Favicon

PAGER help

Can anyone tell me whether it is possible to redirect output (under Windows!) to a separate terminal window or similar using the PAGER variable? What I’m trying to accomplish seems simple but I understand that this might not be straightforward – when using a very simple command such as whos I’d like to be able to still see the output of these commands when I type my next couple of commands. I see that I can redirect the output to a text file or similar but is there some simple way to just have the output displayed in a separate terminal window than the input?

 

Thanks very much-

Cary

_______________________________________________
Help-octave mailing list
Help-octave <at> octave.org
https://mailman.cae.wisc.edu/listinfo/help-octave
Judd Storrs | 9 Feb 17:05
Picon
Gravatar

Some OOP questions

Lately in my quest to simplify, clean my code, and improve
readability, I realized what I really need is just some way to attach
meta data to arrays and that I can achieve this using Octave's OOP.

The idea is to just add struct() interfaces to an octave array so that
meta data can be stored and retrieved. Ideally I would just subclass
the builtin types, but that doesn't work:

@wrapper/wrapper.m:
function w = wrapper(data)
  w.meta = struct();
  w = class(w, "wrapper", data);
endfunction

octave-3.6.1-rc0:1> w = wrapper(ones(10))
error: parents must be objects
error: called from:
error:   /home/storrsjm/src/epirecon/blah/ <at> wrapper/wrapper.m at line 3, column 5
octave-3.6.1-rc0:1>

I didn't really expect this to work because @class stuff are really
struct games. It's too bad though, because something this
straightforward would really have been nice. I would just be
overriding and extending the default behavior where necessary. Not
knowing enough about the implementation, I don't know if it's possible
to add basic class support/emulation to the builtin types. So I got
something roughly working by (error checking removed):

@wrapper/wrapper.m:
function d = wrapper(data)
    d.data = data;
    d.meta = struct();
    d = class(d, "wrapper");
endfunction

@wrapper/subsasgn.m:
function w = subsasgn (w, s, v)
  switch (s(1).type)
    case "()"
      w.data = subsasgn (w.data, s, v);
    case "."
      w.meta = subsasgn (w.meta, s, v);
  endswitch
endfunction

@wrapper/subsref.m:
function b = subsref (w, s)
  switch (s(1).type)
    case "()"
      b = subsref(w.data, s);
    case "."
      b = subsref(w.meta, s);
  endswitch
endfunction

But now I'm going to end up with many, many, many copies of this:

@wrapper/foo.m:
function w = foo(w, varargin)
    w.data = foo(w.data, varargin{:});
endfunction

Is there a different way to handle that? Maybe something like a
generic "missing method" handler for the class?

--judd
James R. Hunter | 9 Feb 16:18
Picon
Gravatar

Problem with Octave, Gnuplot, Mac 10.7.3

I try to run any graphics command from within Octave (3.4.0 4/21/11 compile from SourceForge). This calls Gnuplot (version from within the Octave Extras folder) and it results in the following response:

Last login: Thu Feb  9 12:34:28 on ttys000
b1212134:~ jameshunter$ exec '/Applications/Gnuplot.app/Contents/Resources/bin/gnuplot'
dyld: Library not loaded: /usr/X11/lib/libfreetype.6.dylib
  Referenced from: /usr/X11/lib/libfontconfig.1.dylib
  Reason: Incompatible library version: libfontconfig.1.dylib requires version 14.0.0 or later, but libfreetype.6.dylib provides version 13.0.0
/Applications/Gnuplot.app/Contents/Resources/bin/gnuplot: line 71: 25461 Trace/BPT trap: 5       GNUTERM="${GNUTERM}" GNUPLOT_HOME="${GNUPLOT_HOME}" PATH="${PATH}" DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH}" HOME="${HOME}" GNUHELP="${GNUHELP}" DYLD_FRAMEWORK_PATH="${DYLD_FRAMEWORK_PATH}" GNUPLOT_PS_DIR="${GNUPLOT_PS_DIR}" DISPLAY="${DISPLAY}" GNUPLOT_DRIVER_DIR="${GNUPLOT_DRIVER_DIR}" "${ROOT}/bin/gnuplot-4.4.3" "$ <at> "

I have tried killing all the files and reloading them from the dmg. No joy. The problem appears to be with Aquaterm, but I don't understand it. This problem has only appeared since the last update of Lion from Apple (10.7.3).  Help?


_______________________________________________
Help-octave mailing list
Help-octave <at> octave.org
https://mailman.cae.wisc.edu/listinfo/help-octave
Bernhard Weller | 9 Feb 13:43
Gravatar

xlim gives memory exhausted error when used after plotting (v3.4.3 MinGW Windows)

I encounter a problem, which I didn't using 3.4.2 MinGW.

It's a bit strange as I was not able to recreate the problem using a simple
example, but only with my measured values.

The m-file as well as the data is available from my website (don't know how
big a file attachment is allowed to be):
http://arsenal-of-wisdom.org/downloads/xlimerror.zip (~40 kB)

My code is pretty straightforward (after narrowing it down):
clear; close all;
load xlimerror.mat
figure(1); clf;
hold on
semilogx(EstF, 20*log10(EstMag), 'b-') 
xlim([minF maxF])

The error is related to the xlim([minF maxF]) line and says:
error: memory exhausted or requested size too large for range of Octave's
index type -- trying to return to prompt

So something inside xlim goes wrong - my data is only a tiny 2623x1 for x
and y. And a total of 42kB used memory.

I noticed that if I place the xlim line before the plot command I don't get
an error message.
Is it required to put xlim before the plot commands?

--
View this message in context: http://octave.1599824.n4.nabble.com/xlim-gives-memory-exhausted-error-when-used-after-plotting-v3-4-3-MinGW-Windows-tp4372683p4372683.html
Sent from the Octave - General mailing list archive at Nabble.com.
Thomas D. Dean | 9 Feb 00:44
Picon

Control System Question

I am trying to understand a control system

y(n) = y(n-1) + (1/F1 + 1/F2)*x(n) + (1/F1 - 1/F2)*x(n-1)

where F1=2^6 and F2=2^10.  Which is really an IIR filter.

I have an implementation of this in a uProcessor, controlling a DAC in 
response to counted inputs.  I can monitor these signals with a digital 
scope.

I am trying to understand it with the aim of improvement.

How do I implement this with control 2.2.4?

Tom Dean
f g | 8 Feb 13:54
Picon
Gravatar

Help needed

I am unable to save or run .m files.

Both save and load give error messages.

>Edit (with no file name) opens a window in Octave3.2.4, not in Octave3.4.3. Invoking the file gives no result.

Can someone send me a complete simple sequence for, say "hello world", or anything,  that is supposed to save and load back a file?

I have a Vista operating system. (64 bit)

Thanks,
Fred
fandrgut <at> hotmail.com
_______________________________________________
Help-octave mailing list
Help-octave <at> octave.org
https://mailman.cae.wisc.edu/listinfo/help-octave
Julien Salort | 8 Feb 16:51
Favicon

Re: Who uses Octave?

Le 8 févr. 2012 à 16:48, Mike a écrit :

Hi Julien,
I followed your link to read the manual, but got stopped by a login page.
Thanks,
Mike Gallagher   

Right. I mispasted the link.

Julien
_______________________________________________
Help-octave mailing list
Help-octave <at> octave.org
https://mailman.cae.wisc.edu/listinfo/help-octave

Gmane