MATLAB: How to Update matrix values I have a matrix[2 2:2 2]I want to update these four values one by one ie[3 3:3 3],[4 4:4 4],[5 5:5 5] like thgis I want to update ,,,how can i achieve this with script? Best Answer b = {};a=[1 2;3 4]for i=1:1:100; a=a+1; b = [b a];end Related SolutionsMATLAB: How can make code to present this following case A = [1 2 3 4;3 2 1 4]B{1} = [1 1 1;1 1 1];B{2} = [2 2 2;2 2 2];B{3} = [3 3 3;4 4 4];B{4} = [4 4 4;3 3 3];Res = cell2mat(B(A)) MATLAB: I want to traverse an array in an ‘inverse s’ order and store in a single row array is there any matlab function or code for this?eg[1 2 3; 3 4 5; 4 5 1] becomes [1,2,3,5,4,3,4,5,1] >> A = [1,2,3;3,4,5;4,5,1];>> A(2:2:end,:) = A(2:2:end,end:-1:1);>> reshape(A',1,[])ans = 1 2 3 5 4 3 4 5 1 Related QuestionI want to create a MATLAB code for a matrix of m*n which have each element p*p matrix, plz help to solve thisRemove redundancy values from matrixFrom a=[1 2 3 4] to b=[1 1 2 2 3 3 4 4]What is command for circularly writing a row matrix in matlab
Best Answer