MATLAB: Matching unequal arrays unequal arrays matching ... Hi; I want to match the values of unequal arrays for a case as m=(1:6); n=[1 2 5]; output=(0 0 1 1 0 1) that is if an element of n is in m then the value in output is zero else 1. Any hints? Best Answer output = ~ismember(m,n) Related SolutionsMATLAB: Sum N many of the same array, which are each offset by an integer M function B = movSum(A,n,m)B=A;for k=2:n B=[B;zeros(m,1)]+[zeros((k-1)*m,1);A];endend MATLAB: Adding zeros to an array OutPut = B;OutPut(3,4) = 0; Related Question1D array to 2D array positionsHow to add 1 into the arrayFinding rows in matrix containing numbers from vectorHow to create a matrix of size N×N that has ones in the border and zeros insideHow to find out inverse of matrixFind sum of individual matrix of a given array of matrices and store it in a temporary arrayHow to sort only first column in matlab
Best Answer