[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rmfield does not seem to work
From: |
Michael Goffioul |
Subject: |
Re: rmfield does not seem to work |
Date: |
Thu, 24 Nov 2011 16:30:37 +0000 |
On Thu, Nov 24, 2011 at 4:24 PM, grg <address@hidden> wrote:
> Hi there,
>
> I am runnig octave-3.2.4 on fedora 14 and rmfield does not seem to be
> working (see example below).
> Am I doing something wrong?
>
> Thanks a lot for octave and for any help you may provide.
> grg
>
>
> octave:1> s.f1 = rand(10);
> octave:2> s.f2 = rand(20);
> octave:3> s.f3 = rand(4);
> octave:4> whos
> Variables in the current scope:
>
> Attr Name Size Bytes Class
> ==== ==== ==== ===== =====
> ans 1x33 302 cell
> s 1x1 4128 struct
>
> Total is 34 elements using 4430 bytes
>
> octave:5> isfield(s, "f1")
> ans = 1
> octave:6> rmfield(s, "f1");
I think the correct syntax is:
s = rmfields (s, "f1")
Michael.