`clear variable` does not work ?

Matthias Brennwald matthias.brennwald at nagra.ch
Thu Jan 31 06:35:09 CST 2008


On Thu, 2008-01-31 at 04:07 -0600, help-octave-request at octave.org wrote:
> | global x = [1 2 3];
> | clear x;
> | global x = [9 9 9];
> | x(3) = 7;
> | printf(" x = %d\n", x);
> | 
> | The result was:
> | 
> | x = 1
> | x = 2
> | x = 7
> | 
> | It seems to me that I can't delete or modify, as a whole, the global
> variable 
> | x, but I can write over individual elements.
> 
> To clear the global variable X, you have to write
> 
>   clear global x
> 
> jwe

Ok. But how does this fit in with my previous post, where I used

   clear x

which seemed to have cleared x successfully?


Matthias



More information about the Help-octave mailing list