Change Y axis values in a 2D chart

1 visualización (últimos 30 días)
Yordani
Yordani el 26 de Dic. de 2022
Respondida: Voss el 26 de Dic. de 2022
Hello! Could someone tell me how I can adjust my graph number 3 to be the same as number 4? I want to get the values of the Y axis in logarithmic scale but I don't know how to do it. Thank you
Graph 3
Graph 4
%Permitividad Parte Imaginaria
Wp = 1; %Valor Correcto
gamma = 1e-3; %Valor Correcto
w1 = 0.1; %Valor Correcto
w2 = 0.1; %Valor Correcto
w3 = 10; %Valor Correcto
index = 0;
K = w1:w2:w3;
for w = 1:length(K)
index = index + 1 ;
e(index) = (gamma*Wp^2/K(w)^3+K(w)*gamma^2);
f(index) = K(w);
x(index) = f(index) ;
y(index) = real(e(index));
end
semilogx(x,y)
xlim([0 10])
ylim([-1.5 1.5])
grid
xticklabels({'0.1','1','10'})

Respuesta aceptada

Voss
Voss el 26 de Dic. de 2022
Use loglog instead of semilogx. (And make appropriate changes to ylim.)

Más respuestas (0)

Categorías

Más información sobre Graph and Network Algorithms 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