[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: `clear variable` does not work ?
From: |
John W. Eaton |
Subject: |
Re: `clear variable` does not work ? |
Date: |
Wed, 30 Jan 2008 16:32:25 -0500 |
On 30-Jan-2008, Maynard Wright wrote:
| I executed the following script using Octave 2.1.72:
2.1.72 is obsolete. The current stable version is 3.0.0. Please
consider upgrading.
| 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