Gistlib Logo

gistlib

how do i create a loop that checks checks every column one row at a time in a matrix for a double value of nan in matlab in matlab

main.m
% Assuming 'matrixA' is your matrix
[m, n] = size(matrixA);

for i = 1:m
    for j = 1:n
        if isnan(matrixA(i,j))
            disp(['Found NaN at row ' num2str(i) ' and column ' num2str(j)]);
        end
    end
end
222 chars
11 lines

similar matlab code snippets

how to change the diagonal of a matrix 3x3 with a vector with 3 elements using a loop to create the vectorin matlab in matlab
how to change the diagonal of a matrix to be the sum of its position on row and column in matlab
find negative elements in matrix and keep their values in matlab
how to search a cell matrix for a empty row in matlab
construct a matrix with element to be the sum in matlab
collect ten matrix 784x1 and store it like 784x10 in matlab
remove reoccuring numbers in matrix in matlab
find negative numbers in a matrix in matlab
how to matrix multiply in matlab
make a random 100-by-100 matrix in matlab

related categories

matlab
loops
matrices

gistlibby LogSnag