Use loglog instead of semilogx. (And make appropriate changes to ylim.)
Change Y axis values in a 2D chart
1 次查看(过去 30 天)
显示 更早的评论
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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1243937/image.png)
Graph 4
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1243942/image.png)
%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 个评论
采纳的回答
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Graph and Network Algorithms 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!