poster
2019-12-10, 20:48
是否可以在matlab中绘制实际上不使用值的对数的图?我正在绘制各种值,当我尝试对它们进行对数绘制时,小于1的值将变为负数。我只想在不取其日志的情况下以对数刻度绘制值。
回答:
对的,这是可能的。使用loglog命令 (http://www.mathworks.com/access/helpdesk/help/techdoc/ref/loglog.html) 。
Mathworks网站上的示例:
x = logspace(-1,2); % generate a sequence of points equally spaced logarithmically loglog(x,exp(x),'-s') grid on https://i.stack.imgur.com/Qft5u.png (https://i.stack.imgur.com/Qft5u.png)
如果您不希望两个轴都是对数刻度,请使用semilogx或semilogy (http://www.mathworks.com/access/helpdesk/help/techdoc/ref/semilogx.html) 。
更多&回答... (https://stackoverflow.com/questions/3454513)
回答:
对的,这是可能的。使用loglog命令 (http://www.mathworks.com/access/helpdesk/help/techdoc/ref/loglog.html) 。
Mathworks网站上的示例:
x = logspace(-1,2); % generate a sequence of points equally spaced logarithmically loglog(x,exp(x),'-s') grid on https://i.stack.imgur.com/Qft5u.png (https://i.stack.imgur.com/Qft5u.png)
如果您不希望两个轴都是对数刻度,请使用semilogx或semilogy (http://www.mathworks.com/access/helpdesk/help/techdoc/ref/semilogx.html) 。
更多&回答... (https://stackoverflow.com/questions/3454513)