How to animate two functions at the same time?
Show older comments
Hello,
I don't know how to animate these 2 functions at the same time, maybe using comet, or some type of loop?
If you have any ideas please help.
Here is my code:
clear all;
clc;
close all;
x1=0:0.1:exp(1)-0.01;
x2=exp(1)+0.01:0.1:10;
y1=(log(x1)/log(exp(1))-2)./(log(x1)/log(exp(1))-1); %first function
y2=(log(x2)/log(exp(1))-2)./(log(x2)/log(exp(1))-1); %second function
f=plot(x1,y1);
hold on;
g=plot(x2,y2);
hold off;
xlim([-1 10]); ylim([-30 30]);
grid on;
Accepted Answer
More Answers (0)
Categories
Find more on Animation in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!