Dear MatCont community,
I am currently running simulations in MatCont based on an existing stage-strucutre biomass model.
I have 4 stages (coordinates) which are determined by 4 different system functions.
I want to make sure that the model does not run when one of the coordinates = 0 (or is smaller than 0),
is it possbile to do?
I have tried to define an ifelse statement with the coordinate but MatCont do not accept the ifelse statement because the coordinate is not defined as a function or parameter..
Do you hve any other ideas?
Thanks in advance
Philip Jacobson
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear Philip,
Yes, you can stop the simulation at some point using Event functions. It would also allow to create Poincare sections. You need to set what happens at special points (pause or detect).
This is what you do from the GUI; for the command-line see p44 of the manual.
Create a separate matlab function in the main folder of MatCont, e.g. MyEvent.m;
function [res,term,dir]=MyEvent(t,y,varargin)
res=y(2); % Equation defining the section
isterminal=0; % 0=Do not stop
direction=1; % Detect All (0); increasing(1) or decreasing (-1)
Then select Type-Point; Curve-Orbit, next in the Integrator-window there is an entry Eventfunction. Type "MyEvent" there and press forward.
Best regards, Hil
From: Philip Jacobson philipjac@users.sourceforge.net
Sent: Thursday, November 14, 2019 10:58 AM
To: [matcont:discussion]
Subject: [matcont:discussion] Is it possible to stop simulations in MatCont when one of the coordinates = 0?
Dear MatCont community,
I am currently running simulations in MatCont based on an existing stage-strucutre biomass model.
I have 4 stages (coordinates) which are determined by 4 different system functions.
I want to make sure that the model does not run when one of the coordinates = 0 (or is smaller than 0),
is it possbile to do?
I have tried to define an ifelse statement with the coordinate but MatCont do not accept the ifelse statement because the coordinate is not defined as a function or parameter..
Dear MatCont community,
I am currently running simulations in MatCont based on an existing stage-strucutre biomass model.
I have 4 stages (coordinates) which are determined by 4 different system functions.
I want to make sure that the model does not run when one of the coordinates = 0 (or is smaller than 0),
is it possbile to do?
I have tried to define an ifelse statement with the coordinate but MatCont do not accept the ifelse statement because the coordinate is not defined as a function or parameter..
Do you hve any other ideas?
Thanks in advance
Philip Jacobson
Dear Philip,
Yes, you can stop the simulation at some point using Event functions. It would also allow to create Poincare sections. You need to set what happens at special points (pause or detect).
This is what you do from the GUI; for the command-line see p44 of the manual.
Create a separate matlab function in the main folder of MatCont, e.g. MyEvent.m;
function [res,term,dir]=MyEvent(t,y,varargin)
res=y(2); % Equation defining the section
isterminal=0; % 0=Do not stop
direction=1; % Detect All (0); increasing(1) or decreasing (-1)
Then select Type-Point; Curve-Orbit, next in the Integrator-window there is an entry Eventfunction. Type "MyEvent" there and press forward.
Best regards, Hil
From: Philip Jacobson philipjac@users.sourceforge.net
Sent: Thursday, November 14, 2019 10:58 AM
To: [matcont:discussion]
Subject: [matcont:discussion] Is it possible to stop simulations in MatCont when one of the coordinates = 0?
Dear MatCont community,
I am currently running simulations in MatCont based on an existing stage-strucutre biomass model.
I have 4 stages (coordinates) which are determined by 4 different system functions.
I want to make sure that the model does not run when one of the coordinates = 0 (or is smaller than 0),
is it possbile to do?
I have tried to define an ifelse statement with the coordinate but MatCont do not accept the ifelse statement because the coordinate is not defined as a function or parameter..
Do you hve any other ideas?
Thanks in advance
Philip Jacobson
Is it possible to stop simulations in MatCont when one of the coordinates = 0?
Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/matcont/discussion/762214/
To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/