i have a vector called L the vector contain indexes
also i need to use those indexes while writing the totl matrix MAT(L) into a multidimantional array by doing this:
all this is inside a loop
for k=1:anynumber MAT(:,:,k)
i found that the script doesn't write at all to the destination matrics it only write to the index (:,:,1) and the rest are zeros.
H(:,:,length(frequencies))=zeros(max(rx_pos),max(tx_pos));LinInd=sub2ind(size(H(:,:,length(frequencies))),rx_pos,tx_pos);H(LinInd)=Escat;H(:,:,k)=H(LinInd);
Best Answer