How to change the fill in order of the subplot function ?
10 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
I want to change the fill in order of the subplot function.
In other terms, I want to fill columns after columns instead of lines after lines.
Sorry for my english and thanks for your time.
BELAFDIL Chakib
0 Commenti
Risposta accettata
the cyclist
il 12 Ago 2013
Modificato: the cyclist
il 12 Ago 2013
That ordering is not changeable. (It frustrates me, too, since it is different from the normal linear index ordering!)
I think this function will do the conversion for you:
% The size of the matrix
M = 3;
N = 4;
% The index according to your preferred ordering (column-wise)
i_colwise = 4;
% Conversion function
[jj,ii] = ind2sub([N,M],i_colwise);
i_rowwise = sub2ind([M,N],ii,jj); % This is the ordering MATLAB expects (row-wise)
2 Commenti
the cyclist
il 12 Ago 2013
Modificato: the cyclist
il 12 Ago 2013
I included a little script (using sub2ind and ind2sub) that should convert the linear indices.
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Subplots 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!