How to set semilog axis limit

14 views (last 30 days)
Claymz
Claymz on 28 Jun 2016
Commented: Claymz on 28 Jun 2016
How to set semilog limit on x axis? I want it to be from 100 Hz to 15 000 Hz.

Answers (1)

Chad Greene
Chad Greene on 28 Jun 2016
semilogx(15000*rand(50),rand(50),'bo')
xlim([100 15000])
  1 Comment
Claymz
Claymz on 28 Jun 2016
xlim doesn't work- i've tried it before. this is my code:
semilogx(F1(3:233,:)*1e-3,M1(3:233,:),F1(3:233,:)*1e-3,M2(3:233,:),F1(3:233,:)*1e-3,M3(3:233,:),F1(3:233,:)*1e-3,M4(3:233,:));
legend('1','2','3','4')
grid
xlabel(' Frequency [kHz]','FontName','calibri','FontSize',35);
ylabel('PSD','FontName','calibri','FontSize',35);
title('','FontSize',35,'FontName','calibri');
set(gca,'FontSize',20, 'YLim', [30, 120]);
set(gca,'xscale','log');

Sign in to comment.

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!