I would like to be able to assign the outer product of two arrays to a
third:
a(1:5,1:8)=b(1:5)*c(1:8)
There seems to be no way to do this without using a do loop over one
of the indices. Is that correct? I am aware that such a construction
would be ambiguous in a case like
a(1:4,1:4)=b(1:4)*c(1:4)
though even here there is an 'obvious' interpretation.
(This isn't just idleness -- I have a lot of such assignments, with
varying indices, in a rather dense piece of code, and the do loops
will make it even more cluttered than it is already.)
--
Anthony Stone http://fandango.ch.cam.ac.uk/
University Chemical Laboratory, Email: [log in to unmask]
Lensfield Road, Phone: +44 1223 336375
Cambridge CB2 1EW Fax: +44 1223 336362
|