MATLAB Answers

How do I convert a linear scale array to a logarithmic without getting negative values?

24 views (last 30 days)
farzad
farzad on 6 Jul 2020
Commented: farzad on 9 Jul 2020
Hi All
I need to plot ( bar plot) values, and on the X axis , I want to convert them to logarithmic, but the values <1 become negative. how to avoid and fix it ?

Answers (1)

madhan ravi
madhan ravi on 6 Jul 2020
Replace < 1 with nan.

  14 Comments

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!

Translated by