log ticks on Y-axis

조회 수: 4 (최근 30일)
Mehdi Jaiem
Mehdi Jaiem 2021년 1월 19일
댓글: Mehdi Jaiem 2021년 1월 19일
Dear community
I am new to matlab and try to reproduce ticks on the Y-Axis according to a logatithmic scale (see photo).
Any help is appreciated
%b=log10(8000);
%yc1=logspace(2,b,23);
yc2=linspace(1e2,8e3,23)
yd=stem(yc2);
xlabel('Borders','FontSize',12);
ylabel('F (Hz)','FontSize',12);
set(gca,'YLim',[1e2 1e4],'YTick',[10^2 10^3 10^4]);
In the exercice it is said to use logspace and not linspace

채택된 답변

Daniel Pollard
Daniel Pollard 2021년 1월 19일
set(gca, 'YScale', 'log')
Is this what you mean?
  댓글 수: 1
Mehdi Jaiem
Mehdi Jaiem 2021년 1월 19일
Yes thank you it worked !

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by