MATLAB: Please, correct the following logical index in vetor. logical index % Need to write the elements from 1 to ref, and from ref to n. Where n is the vector dimension. X(1:ref && ref:n) Best Answer What you describe just inserts 1 element into your vector. Is that what you mean?Anyway, this is not logical indexing. If you want to do this, you can just writeX([1:ref ref:n])Logical indexing would be something likeX(X~=ref) Related SolutionsMATLAB: Logical indexing Use LOGICAL to do the type conversion:a(logical(b)) MATLAB: Convert a vetor of hours into time x = (0:23).';n = numel(x);out = datestr([ones(n,1)*[2012 3 10] x zeros(n,2)],'HH:MM'); Related QuestionWhat is meant by this syntax : L(1) , what does these braces after any variable mean
Best Answer