フィルターのクリア

"Warning: Negative data ignored" for title(), xlabel(), ylabel()

2 ビュー (過去 30 日間)
Minh Tran
Minh Tran 2021 年 7 月 23 日
回答済み: Chunru 2021 年 7 月 23 日
When I am plotting using the logarithmic scale, either semilogx() or set(gca,'xscale','log') will cause the title(), xlabel(), and ylabel() to generate Negative data ignored warning. The warning disappears when all of those are commented out or deleted, but a plot without title and labels just doesn't seem right. Anyone can help me with why this is happening and are there any ways to resolve this?

回答 (1 件)

Chunru
Chunru 2021 年 7 月 23 日
There is no problem except for the warning:
x=(-1:.1:10); semilogx(x, cos(x))
xlabel('x')
Warning: Negative data ignored
ylabel('y')
title('test')

カテゴリ

Help Center および File ExchangeAnnotations についてさらに検索

製品


リリース

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by