I am using [m, d] = nanmax (r_all); to get the maximum values and corresponding indices in matlab. There are several columns in r_all in which all the elements are nans. Unfortunately, nanmax returns '1' in indices for those columns that have all nans. However, there are actual indices that are value '1' so it creates confusion. How can I force matlab to return 'a' or 'b' as the output instead of returning 0' or '1'? Could you please suggest other solutions to this problem?
6 件のコメント
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/273736-indices-when-the-columns-are-all-nan#comment_350720
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/273736-indices-when-the-columns-are-all-nan#comment_350720
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/273736-indices-when-the-columns-are-all-nan#comment_350727
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/273736-indices-when-the-columns-are-all-nan#comment_350727
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/273736-indices-when-the-columns-are-all-nan#comment_350736
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/273736-indices-when-the-columns-are-all-nan#comment_350736
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/273736-indices-when-the-columns-are-all-nan#comment_350737
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/273736-indices-when-the-columns-are-all-nan#comment_350737
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/273736-indices-when-the-columns-are-all-nan#comment_350740
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/273736-indices-when-the-columns-are-all-nan#comment_350740
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/273736-indices-when-the-columns-are-all-nan#comment_350747
このコメントへの直接リンク
https://jp.mathworks.com/matlabcentral/answers/273736-indices-when-the-columns-are-all-nan#comment_350747
サインインしてコメントする。