Pixel by pixel comparison of 5 matrices into new matrices.
Hello!
I have 5 matrices: M1 = randi(100,10) , M2, M3 etc.
I want to be able to make new matrices with all of the same pixels in each matrix (so N1 = M1(1), M2(1) etc. until I reach N100 = M1(100), M2(100), etc.). I can do this manually, but the size of each matrix(10×10) would make this a very long process. I have been trying to mess around with for loops but cannot seem to figure out how to properly use them to create all 100 1×5 matrices. Are there any tips or ways to make this process happen? I tried using cell arrays as well in a for loop and yet I still am unable to do so.Hello!
I have 5 matrices: M1 = randi(100,10) , M2, M3 etc.
I want to be able to make new matrices with all of the same pixels in each matrix (so N1 = M1(1), M2(1) etc. until I reach N100 = M1(100), M2(100), etc.). I can do this manually, but the size of each matrix(10×10) would make this a very long process. I have been trying to mess around with for loops but cannot seem to figure out how to properly use them to create all 100 1×5 matrices. Are there any tips or ways to make this process happen? I tried using cell arrays as well in a for loop and yet I still am unable to do so. Hello!
I have 5 matrices: M1 = randi(100,10) , M2, M3 etc.
I want to be able to make new matrices with all of the same pixels in each matrix (so N1 = M1(1), M2(1) etc. until I reach N100 = M1(100), M2(100), etc.). I can do this manually, but the size of each matrix(10×10) would make this a very long process. I have been trying to mess around with for loops but cannot seem to figure out how to properly use them to create all 100 1×5 matrices. Are there any tips or ways to make this process happen? I tried using cell arrays as well in a for loop and yet I still am unable to do so. matrices, image segmentation, for loop, help MATLAB Answers — New Questions