MATLAB: How to change the arrangement of numbers loop If I have a number 1193, how do I get 3119, 9311, 1931 and so forth after each loop? Best Answer str = '1193' ;idx = perms(1:4) ;iwant = str(idx)You can use str2double to get them into numbers. Related SolutionsMATLAB: Mismatch between file and format string. Hi,use readtable, then extract the data from the variable CLOSE (=column named CLOSE) in ascending order:data = readtable('semga.csv');CLOSE = data.CLOSE(1191:1376);Note that your table has only 1376 entries, since the first row are variable names. So i changed(1192:1377)to(1191:1376)If needed use flip function, to get the order you want:CLOSE = flip(CLOSE)Best regardsStephan MATLAB: Change or remove duplicate matrix elements X = [1 2 3 3 4 5 2]';X2 = sort(X,1);idx = [false;diff(X2)<(10^-6)]; %equal to 10^-6th precisionX2(idx) = X2(idx)+.1; Related QuestionSorting through labelled dataHow to find all uppercase letters in a stringHow to group a sample data by a column into small groupsHow to change multiple items in a text fileHow to index a matrix by using a index matrix that has same sizeHow to discard all punctuation from a text file
Best Answer