LOGLOGPN

版本 1.0.0.0 (2.7 KB) 作者: Frederic Moisy
LOGLOGPN is the same as LOGLOG, except that the Y data may have positive and negative values
2.1K 次下载
更新时间 2007/4/12

无许可证

LOGLOGPN(...) is the same as LOGLOG(...), except that the Y data may have positive and negative values. This is useful to detect unexpected negative values in the Y data (causing repeated 'Negative data ignored' warnings), or to visualize the magnitude of an oscillating signal in log scale.

LOGLOGPN(X,Y) plots X versus Y in log-log scale, where Y may have positive and negative values. By default, negative values are plotted with dashed lines and positive values with full lines. If X is not specified, Y is plotted versus its index.

LOGLOGPN(X,Y,LineSpecPos,LineSpecNeg) specifies LineSpecPos and LineSpecNeg for the line types, marker symbols and colors for the positive and negative values of Y. For instance, LOGLOGPN(X,Y,'ro-','b*') plots the positive Y with red line and 'o' markers and the negative Y with blue stars '*'.

LOGLOGPN(X,Y,LineSpecPos,LineSpecNeg,'PropertyName',PropertyValue,...) sets property values for all lineseries graphics objects created by LOGLOGPN. See the line reference page for more information.

[HP, HN] = LOGLOGPN(...) returns the handles to the two lineseries graphics objects.

Similarly, SEMILOGYPN(...) works like SEMILOGY(...).

Examples:
x = linspace(1,10,200);
y = sin(x*2)./x;
loglogpn(x,y,'r.','bo');
axis([1 10 1e-2 1]);

loglogpn(x,y,'b-','r:','LineWidth',2);

[hp, hn] = loglogpn(x,y,'k');
set(hp, 'LineWidth', 1);
set(hp, 'LineWidth', 2);

引用格式

Frederic Moisy (2024). LOGLOGPN (https://www.mathworks.com/matlabcentral/fileexchange/14606-loglogpn), MATLAB Central File Exchange. 检索来源 .

MATLAB 版本兼容性
创建方式 R2007a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Log Plots 的更多信息

Community Treasure Hunt

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

Start Hunting!
版本 已发布 发行说明
1.0.0.0

improvement, more examples.