# Creating two random matrices in the same spreadsheet?

Alasdair shared this question 3 years ago

I was trying to create some random matrix examples. In the Spreadsheet View, I can enter

RandomBetween(-10,10)

in cell A1, and copy that into cells A1:D4 for example. This gives me a square random array that I can copy into another view (Algebra or CAS) as a matrix.

But suppose I want to enter another random matrix in cells A6:A9?

If I choose the element in A1, and copy it to cells A6:A9, all I get is four repetitions of the value in A1. It doesn't copy the formula to produce random values.

If I ensure that the Object Properties of A6 are that its definition is also RandomBetween(-10,10), then if I copy that across or down what is copied is the text "=RandomBetween(-10,10)".

Try as I might I can't seem to obtain another array of random values in my spreadsheet.

In fact it's a bit worse: if I try to write over the current values by coping A1 into cells A1:E4, then again only the text gets copied.

--

Arrgh, now my spreadsheet won't let me do anything. If I enter in the Algebra view:

FillCells(A1:D4, RandomBetween(-10,10))

which should work, according to the manual, nothing happens: only the text gets copied, except for one cell which has a question mark in it I can't get rid of.

Without quitting and restarting GeoGebra, is there any way of getting the spreadsheet back to its initial state, that is, before I tried copying things in and out of it? 1 1

Quote: "...is there any way of getting the spreadsheet back to its initial state..."

Click on the empty square at the top left (next to the letters and above the numbers).The whole table is then marked. Now press the Delete key.