Exponential Function Plotting From Reverse
古いコメントを表示
Hello,
I want to plot the graph of exponential function but in reverse order. For example I want this plot to start from 5 and decrease until 0 not from 0 to 5. I will also use drawnow to animate the plot. How can I do that time operation? My code is like that. I want this operation comes reversely.
clear all
close all
t = 0:1:150;
x = log(1004*t);
figure
for i=1:numel(t)
plot(t(i),x(i),'.','Color','r')
hold on
drawnow
ylim([0 30])
xlim([0 150])
grid minor
end
採用された回答
その他の回答 (1 件)
clear all
close all
t = 0:1:150;
x = log(1004*t);
figure
plot(t,x,'Color','r')
grid minor
set(gca,'XDir','reverse')
4 件のコメント
tinkyminky93
2022 年 2 月 26 日
tinkyminky93
2022 年 2 月 26 日
t = 0:1:150;
x = log(1004*t);
figure
plot(t,x,'Color','r')
grid minor
tinkyminky93
2022 年 2 月 26 日
カテゴリ
ヘルプ センター および File Exchange で 2-D and 3-D Plots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

