How to cut and reshape values?
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
out =
Columns 1 through 5
90 90 -45 0 0
90 90 -45 0 0
90 90 -45 0 0
90 90 -45 0 45
90 90 0 0 45
90 -45 0 0 45
Columns 6 through 9
45 45 0 -45
45 45 -45 0
45 0 -45 45
45 0 -45 0
45 0 -45 -45
45 0 -45 90
i want to reshape it into layer
layer = reshape(layer',size(layer,2),1,size(layer,1))
but i'm getting vertical...but i need horizontal
& I want only last 5 layer Means
layer(:,:,1) = [90 90 -45 0 0 45 45 -45 0];
layer(:,:,2) = [90 90 -45 0 0 45 0 -45 45] and so on....
0 Commenti
Risposta accettata
Andrei Bobrov
il 26 Gen 2016
Modificato: Andrei Bobrov
il 26 Gen 2016
layer1 = reshape(layer(2:end,:)',1,size(layer,2),5)
5 Commenti
Più risposte (1)
Vedere anche
Categorie
Scopri di più su Logical in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!