Referencing elements in a reshape expression
Alberto Luaces
aluaces@udc.es
Fri Feb 7 16:50:00 GMT 2014
Hello,
is it possible to access elements of a reshape expression? Rmat and
rloc are 3Ã3 matrices:
pos(1:3) = reshape(matmul(Rmat, rloc), [9])([2, 6, 7])
my compiler âgfortran 4.8â shows an error:
pos(19:21) = reshape(matmul(Rmat, rloc), [9]) ([2, 6, 7])
1
Error: Invalid character in name at (1)
Currently I have to perform this operation through an additional step:
temp = reshape(matmul(Rmat, rloc), [9])
pos(1:3) = temp ([2, 6, 7])
Thanks,
--
Alberto
More information about the Fortran
mailing list