0
$\begingroup$

I am investigating the motion of a robot with regards to four variables. Here is the code for my system:

$$p'=\dot{p}$$

$$\dot{p}'= \frac{2 Nwa (Npa_{1}-\dot{p})}{1+exp(kd q^2)} + \frac{2 Nwb (Npb_{1}-\dot{p})}{1+exp(kd r^2)}$$

$$Nwa'=ks \left((A Nwa)^3+ \frac{B Nwa^2}{1+K q}+C Nwa\right)$$

$$Nwb'=ks \left((A Nwb)^3+ \frac{B Nwb^2}{1+K r}+C Nwb\right)$$

$$x_{1}=\dot{p}$$

$$x_{2}=exp(-p^2)$$

$$q=((Npa_{1}-x_{1})^2+(Npa_{2}-x_{2})^2)^{\frac{1}{2}}$$

$$r=((Npb_{1}-x_{1})^2+(Npb_{2}-x_{2})^2)^{\frac{1}{2}}$$

(plus variable and initial conditions)

My code works fine and shows the system correctly. However, I want to work with $xpp$ plotting $\dot{p}$ on the $x$ axis (this is fine) and $x_{2}$ on the $y$ axis. It was not let me do this (I'm guessing because $x_{2}$ is not a variable even though it is defined in terms of a variable?) Do you have any advice on how to work around this.

Thanks for your help :)

$\endgroup$

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.