how to use circshift in matlab
Ältere Kommentare anzeigen
I have a array of indeces, so they must be positive, but some of them are negative, for instance for a array of m elements, I want to say if i=-1 put i=M-1, and if i=-2 put it M-2, how can I use circshift?
3 Kommentare
Image Analyst
am 21 Dez. 2012
Bearbeitet: Image Analyst
am 21 Dez. 2012
Please give an example. Just saying "put it M-2" is not descriptive enough. circshift works on the whole array, it does not use different shifts on an element by element basis.
ss
am 21 Dez. 2012
Image Analyst
am 21 Dez. 2012
I think Matt is right - you want mod(), not circshift().
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Resizing and Reshaping Matrices finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!