MATLAB Answers

How to fix a number equal to null in MATLAB

5 views (last 30 days)
Nisar Ahmed
Nisar Ahmed on 13 Aug 2020
Commented: Nisar Ahmed on 13 Aug 2020
I have a lot values (equal to -999.25) in my data columns. I want that matlab read these values (-999.25) as zero when ever I load or run my data on MATLAB. How can I fix this problem? Please help

Accepted Answer

源樹 上林
源樹 上林 on 13 Aug 2020
a = [ 1 2 3 -999.25 -999.25 4 5]
a(a == -999.25) = 0

Sign in to comment.

More Answers (0)


Community Treasure Hunt

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

Start Hunting!

Translated by