Fitting datapoint to a x-axis on a figure

1 回表示 (過去 30 日間)
Lily
Lily 2014 年 3 月 2 日
編集済み: the cyclist 2014 年 3 月 2 日
I'm trying to fit the x-axis on my figure so that there will be an nearly equal spacing between data points. Especially minimize the spacing between 100ms, 200ms, 400ms and 1000ms. Could you help me?
T = [0.05 0.1 0.2 0.5 1.2 2 6 12 21 50 100 200 400 1000]; %[ms]
I = [70 50 35 25 19 18 15 15 15 15 15 15 15 38]; %[mA]
figure (1)
plot(T,I,'m');
hold on
grid on
xlabel('Time [ms]');
ylabel('Current [mA]');
hold off

採用された回答

the cyclist
the cyclist 2014 年 3 月 2 日
編集済み: the cyclist 2014 年 3 月 2 日
Maybe you want to plot on a log axis? Try the semilogx() command:
T = [0.05 0.1 0.2 0.5 1.2 2 6 12 21 50 100 200 400 1000]; %[ms]
I = [70 50 35 25 19 18 15 15 15 15 15 15 15 38]; %[mA]
figure (1)
semilogx(T,I,'.-m');
hold on
grid on
xlabel('Time [ms]');
ylabel('Current [mA]');
hold off
I also added markers at the data points, to make them stand out more.

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by