How to replace values less than equal to zero values in a matrix?

I have a marix of 44450*8 dimention, which contain some zero and negative values, I want to replace them with NaN. how to do that?

更多回答(1 个)

matrix (matrix<=0)= NaN

1 个评论

HOW TO NAME THE VARIABLE BECAUSE IF I WRIGHT IT GIVES ME AN ERROR FOR EXAMPLE e =matrix (matrix<=0)= NaN;

请先登录,再进行评论。

产品

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by