HOW TO RESHAPE 3D ARRAY WITH DIFFERENT DIRECTIONS?
Afficher commentaires plus anciens
for i = 1:length(j)
NETPLP(:,:,i)= [BPavg1(1,1,i), SPavg1(1,1,i), NETPLP1(1,1,i); BPavg2(1,1,i), SPavg2(1,1,i), NETPLP2(1,1,i); BPavg3(1,1,i), SPavg3(1,1,i), NETPLP3(1,1,i); BPavg4(1,1,i), SPavg4(1,1,i), NETPLP4(1,1,i); BPavg5(1,1,i), SPavg5(1,1,i), NETPLP5(1,1,i); BPavg6(1,1,i), SPavg6(1,1,i), NETPLP6(1,1,i); BPavg7(1,1,i), SPavg7(1,1,i), NETPLP7(1,1,i); BPavg8(1,1,i), SPavg8(1,1,i), NETPLP8(1,1,i)];
end
PL1 = reshape(permute(NETPLP(1,:,:),[1,3,2]), size(NETPLP(1,:,:),1)*size(NETPLP(1,:,:),3), 3);
PL2 = reshape(permute(NETPLP(2,:,:),[1,3,2]), size(NETPLP(2,:,:),1)*size(NETPLP(2,:,:),3), 3);
PL3 = reshape(permute(NETPLP(3,:,:),[1,3,2]), size(NETPLP(3,:,:),1)*size(NETPLP(3,:,:),3), 3);
PL4 = reshape(permute(NETPLP(4,:,:),[1,3,2]), size(NETPLP(4,:,:),1)*size(NETPLP(4,:,:),3), 3);
PL5 = reshape(permute(NETPLP(5,:,:),[1,3,2]), size(NETPLP(5,:,:),1)*size(NETPLP(5,:,:),3), 3);
PL6 = reshape(permute(NETPLP(6,:,:),[1,3,2]), size(NETPLP(6,:,:),1)*size(NETPLP(6,:,:),3), 3);
PL7 = reshape(permute(NETPLP(7,:,:),[1,3,2]), size(NETPLP(7,:,:),1)*size(NETPLP(7,:,:),3), 3);
PL8 = reshape(permute(NETPLP(8,:,:),[1,3,2]), size(NETPLP(8,:,:),1)*size(NETPLP(8,:,:),3), 3);
PL= [PL1;PL2;PL3;PL4;PL5;PL6;PL7;PL8];
LENGTH(J) = 20. IN WHICH I GOT
I WANT VALUES OF PL WITHOUT ASSIGNING THE VARIABLE PL1, PL2, P3, PL4, PL5, PL6, PL7 AND PL8.
PLEASE HELP ME.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Logical dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!