octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #31491] save produces unloadable output for ne


From: anonymous
Subject: [Octave-bug-tracker] [bug #31491] save produces unloadable output for nested anonymous functions
Date: Fri, 29 Oct 2010 01:25:39 +0000
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 IceCat/3.6.11 (like Firefox/3.6.11)

URL:
  <http://savannah.gnu.org/bugs/?31491>

                 Summary: save produces unloadable output for nested
anonymous functions
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Fri 29 Oct 2010 01:25:38 AM UTC
                Category: None
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: Brandon Bensel
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.2.4
        Operating System: GNU/Linux

    _______________________________________________________

Details:

> c = @(f, T, n, t) (1/T)*trapz(t, f(t).*exp(-j.*2.*pi./T.*n.*t))
> four = @(f, T, n, t) sum(arrayfun(@(N) c(f, T, N, linspace(0, T,
100)).*exp(j*2*pi/T*N*t), [-n:n]))
> afour = @(f, T, N, t) arrayfun(@(x) four(f, T, N, x), t)
> save fourier

The printed representation of four/afour is incorrect, for instance:

afour =

@(f, T, N, t) arrayfun (@(x) four (f, T, N, x);
, t)

This of course prohibits loading the file; the file will only load after
manual correction to the entries for four/afour.

octave:1> load fourier
parse error:

  syntax error

>>> @(f, T, N, t) arrayfun (@(x) four (f, T, N, x);

Attached is the file "fourier" produced by the command "save fourier".



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Fri 29 Oct 2010 01:25:38 AM UTC  Name: fourier  Size: 4kB   By: None

<http://savannah.gnu.org/bugs/download.php?file_id=21854>

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?31491>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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