How can i remove (or hide) the time units ("(seconds)") from the stepplot graphic in the x-axis?
50 ビュー (過去 30 日間)
古いコメントを表示
numM=[1.123];
denM=[1 0.1912];
M=tf(numM,denM, 'Outputdelay',0.02);
hfig=figure;
for f=[0.3 0.5 0.7 0.1]
sim("Evaporador_18_03_2023.slx");
plot(t,xP_d,'--','LineWidth',2);
ax = gca;
colororder(["#E68000";"#8040E6";"#000000";"#A2142F"])
hold all
end
for x=[0.3 0.5 0.7 0.1]
opt = stepDataOptions;
opt.StepAmplitude =x;
m=stepplot(M,opt,40);
%setoptions(h,'TimeUnits','hours','Grid','on');
hold all
end
hold off
grid;
title('Comparação....');
xlabel('Tempo (horas)') %i want this label without the "(seconds)" in the end
ylabel('% weight');
legend('xF vs xP(0.3)','xF vs xP(0.5)','xF vs xP(0.7)','xF vs xP(0.1)','M(0.3)','M(0.5)','M(0.7)','M(0.1)');
0 件のコメント
採用された回答
Paul
2023 年 3 月 19 日
If you're willing to accept 'hours' in the label instead of 'horas' then set the TimeUnit property of M
numM=[1.123];
denM=[1 0.1912];
M=tf(numM,denM, 'Outputdelay',0.02,'TimeUnit','hours');
opt = stepDataOptions;
opt.StepAmplitude =1;
m=stepplot(M,40,opt); % had to reverse the arguments
xlabel('Tempo')
If that's not acceptable, it's probably easier to use step() and create your own plot
[y,t] = step(M,40);
plot(t,y);
xlabel('Tempo (horas)')
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Logical についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!