log ticks on Y-axis

6 visualizaciones (últimos 30 días)
Mehdi Jaiem
Mehdi Jaiem el 19 de En. de 2021
Comentada: Mehdi Jaiem el 19 de En. de 2021
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

Respuesta aceptada

Daniel Pollard
Daniel Pollard el 19 de En. de 2021
set(gca, 'YScale', 'log')
Is this what you mean?
  1 comentario
Mehdi Jaiem
Mehdi Jaiem el 19 de En. de 2021
Yes thank you it worked !

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Creating and Concatenating Matrices en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by