Matrix element assignment?

(stuart macgregor) #1

I have just completed a little first ruby job (oo wrapper lib for
(some aspects of) the nec2 EM simulator) - a very nice tool :slight_smile:

One thing puzzled me: the built in Matrix class - how do you assign values
to individual elements? operator []=(i,j) seems not to have been defined?
I suppose it is either obvious and I missed it, or left out for some very
good reason? Perhaps one should use Array and convert to/from Matrix
for the occasional matrix/vector equation?

I ended up using a mixture of Array and NArray.