MATLAB: How to draw line from first element of cell array to same cell array but fliplr first element and soon

how take variable value every iteration

how to take the first element from two cell array in single for loop

Best Answer

  • This is the easiest way to do what I believe you want:
    CHM = {[] [] [17] [] [6,11] [1 9]};
    A = CHM(cellfun(@(x) ~isempty(x), CHM));
    A{:} % Display Contents Of ‘A’
    produces:
    ans =
    17
    ans =
    6 11
    ans =
    1 9
    EDIT: Added results of displaying ‘A’