Hello everybody,
I am cleaning some code and I came across with the following and I hope you guys can give some extra insigths.
The code is working like shown but I'd like to simplify it somehow.
- Both hil and rom are allocated.
- schema contains indexes. The value of these indexes is no greater than the dimensions of hil and rom.
- hil initially is zeros and I want to fulfill it with values from rom in due position.
for i = 1:M for j = 1:N hil(i,schema(i,:,j),j) = rom(i,schema(i,:,j),j); end end
Thanks,
Rui
Best Answer