Hi all,
The equation I want to plot is
I've tried to gether information online and come up with the code:
clcclearsyms x(t)Dx = diff(x);D2x = diff(x,2);w = 1dt = 1/1000;t = 0:dt:1000*dt;equ = D2x + (Dx)^3 + x(t)^2 *Dx + x(t) == 0;figurefplot(equ)
How to plot the graph with the time interval t?
Edit:
To plot the 2 equation and plot them on the same graph
Can I use the code like this:
syms x_1 x_2 equ(t) Dx_1 = diff(x_1);D2x_1 = diff(x_1,2);Dx_2 = diff(x_2);D2x_2 = diff(x_2,2);w_1 = w_2 = 1a_1 = a_2 = 1B_1 = B_2 = 1r_1 = r_2 = 1equ_1 = D2x_1 + (a_1*(Dx_1) + B_1*x_1^2 - r_1 )*Dx_1 + w_1^2*x_1;equ_2 = D2x_2 + (a_2*(Dx_2) + B_2*x_2^2 - r_2 )*Dx_2 + w_2^2*x_2;figurefimplicit(equ_1, [-1 1]) % Use _fimplicit1 To Plot ‘equ(t)=0’
hold onfimplicit(equ_2, [-1 1])grid
Would the graph plot with this code be the solution of the equation?
Best Answer