Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trajectory 1D system starts at t = 0, instead of (t, y) clicked #5

Open
burgerga opened this issue Aug 26, 2018 · 5 comments
Open

Trajectory 1D system starts at t = 0, instead of (t, y) clicked #5

burgerga opened this issue Aug 26, 2018 · 5 comments

Comments

@burgerga
Copy link
Contributor

Came across this when using the phasePlaneAnalysis on a 1D function. It's not really a problem, but it might not be what you expect to happen.

@mjg211
Copy link
Owner

mjg211 commented Sep 3, 2018 via email

@mjg211
Copy link
Owner

mjg211 commented Jun 1, 2019

Still unsure on the best way to resolve this, as at present trajectory() returns a single numeric vector t, given that tlim and tstep define t for ALL initial conditions.

If trajectories can be plotting in the 1D case with different initial values of t, should it just calculate the numerical solution back to 0 so a single t can be retained, but then plot from only the chosen initial t?

@burgerga
Copy link
Contributor Author

burgerga commented Jun 5, 2019

Hmm, I see the problem... tlim is also xlim in the 1D case. I will think about possible solutions and try some stuff

@burgerga
Copy link
Contributor Author

burgerga commented Jun 5, 2019

It might be weird for 2D systems as well, if you do

trajectory(simplePendulum,
                                        y0         = y0,
                                        tlim       = c(0, 10),
                                        parameters = 5)
trajectory(simplePendulum,
                                        y0         = y0,
                                        tlim       = c(5, 10),
                                        parameters = 5)

do you expect the same starting point?

@mjg211
Copy link
Owner

mjg211 commented Jun 13, 2019

Very true; it should probably always be computing the trajectory from t=0, and then just plotting based on tlim.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants