How can I use xticks with a bigger range of values towards x axis

4 ビュー (過去 30 日間)
Tasin Nusrat
Tasin Nusrat 2021 年 9 月 25 日
回答済み: Star Strider 2021 年 9 月 25 日
The X axis have the range of 1khz to 100Mhz with ticks at 10khz,100khz, 1Mhz, 10Mhz.
freq=1e+3:1e+8; %frequency range
xlim([1e+3 1e+8])
xticks([10e+3 100e+3 1e+6 10e+6])
but this is not working,

回答 (1 件)

Star Strider
Star Strider 2021 年 9 月 25 日
Perhaps semilogx would do what you want.
A different way to do the same thing —
set(gca, 'XScale','log')
xlim([1e+3 1e+8])
xticks([10e+3 100e+3 1e+6 10e+6])
.

カテゴリ

Help Center および File ExchangeGrid Lines, Tick Values, and Labels についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by