Info

This question is closed. Reopen it to edit or answer.

How can change my code without loop?

1 view (last 30 days)
donato
donato on 5 Mar 2013
Closed: MATLAB Answer Bot on 20 Aug 2021
Hello all another way to do this without loop...this code slice the given matrix in matrices of size 256x13x13. after reshape the freshly cut saves the matrix in the matrix X. I wanted to know if you could do all this without looping.
dim_cov=13;
campioni=179;
data = randn(256,191, (dim_cov+1));
for q=1:campioni
X(:,:,q)=reshape(data(:,q+(1:dim_cov)-1,(1:dim_cov)),256,dim_cov*dim_cov);
end
TNK AT ALL!!!!

Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!