how to plot x axis with ratio unit instead of proportional unit

2 vues (au cours des 30 derniers jours)
Steven Lai
Steven Lai le 15 Juil 2021
I'm doing some research about electrodes, and I want to show the relationship between electrode contact impedance and measured voltage, with contact impedance as x axis and measured voltage as y axis.
My problem is the data of contact impedance is in ratio and not propotional, and when plotting it can only shows a spicific region and not all of the contact impedance data.
My contact impedance data points are 1000, 1, 10^-3, 10^-6, 10^-9, and when i plot it only shows region between 1 and 1000 so the measured voltage below impedance=1 are all squeezed to the left. Is there any way that i can expand the left side of the x axis and make it look like a propotional x axis so the measured V can be clearly seen, and their corrisponding impedance?

Réponse acceptée

Star Strider
Star Strider le 15 Juil 2021
I am not certain that I understand the problem. However when you mention ‘squeezed to the left’, that could be correctged by using a semilogx (or loglog) plot.
Consider —
x = [1E-9 1E-6 1E-3 1 1E+3];
y = x.^2;
figure
subplot(3,1,1)
plot(x, y, 'p-', 'LineWidth',2)
grid
title('linear')
subplot(3,1,2)
semilogx(x, y, 'p-', 'LineWidth',2)
grid
title('semilogx')
subplot(3,1,3)
loglog(x, y, 'p-', 'LineWidth',2)
grid
title('loglog')
.

Plus de réponses (1)

KSSV
KSSV le 15 Juil 2021
You can plot log of the value. Read about semilog.

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Tags

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by