Change Y axis values in a 2D chart
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
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'})
0 Commenti
Risposta accettata
Voss
il 26 Dic 2022
Use loglog instead of semilogx. (And make appropriate changes to ylim.)
0 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Graph and Network Algorithms in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!