·

Engenharia Elétrica ·

Processamento Digital de Sinais

Send your question to AI and receive an answer instantly

Ask Question

Preview text

Author C Samuel GOUGEON Le Mans France Related Software Scilab License CeCILLB httpwwwcecillinfolicences Release 20 Date 20150524 Distribution httpfileexchangescilaborgtoolboxes161000 History 00 2010 Creation 10 20110515 first publication on FileExchange 20 20150524 usage with structure arrays was undocumented extension to cell arrays Reference httpbugzillascilaborgshowbugcgiid7293 function R cshiftMd CALLING SEQUENCES cshift displays this help R cshiftM d circularly shifts by di positions components of M along its ith dimensions PARAMETERS MR vector matrix or hypermatrix of any data type Structure or cell arrays d vector of integers di is the shift to be applied to the Ms components along its ith dimension EXAMPLES With a matrix or hypermatrix M resizematrix1 2 3 4 3 3 2 M12122 5 6 7 8 cshiftM 1 cshiftM 1 cshiftM 0 1 cshiftM 1 1 cshiftM 0 1 1 With an array of structures s43b t s22r pi s31t test cs cshifts1 1 cs12b cs31r cs43t With a cells array c cell43 c43entries t c22entries pi c31entries test cshiftc11 Fname cshift if argn20 headcommentsFname R return end s sizeM R M for i1lengthd if si1 D pmodulodisi if D0 S emptystr1lengths Si siD1si 1siD S strcatS if typeofR ce execstrR RS else execstrRentries RSentries end end end end endfunction