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

About Matrix F #1

Open
qqstar-423 opened this issue Sep 27, 2022 · 1 comment
Open

About Matrix F #1

qqstar-423 opened this issue Sep 27, 2022 · 1 comment

Comments

@qqstar-423
Copy link

F = jacobian_state(X, dt);
In function jacobian_state writes that

double delta=0.0001;
for(;;){
x_plus = x;
x_plus(i) = x_plus(i) + delta; 
.......
}

When f () calculates the partial derivative of x, why should we set delta to 0.0001? Will it get better results if we set delta smaller?

@gilmarpcjunior
Copy link
Collaborator

F = jacobian_state(X, dt); In function jacobian_state writes that

double delta=0.0001;
for(;;){
x_plus = x;
x_plus(i) = x_plus(i) + delta; 
.......
}

When f () calculates the partial derivative of x, why should we set delta to 0.0001? Will it get better results if we set delta smaller?

The delta variable is the time interval to calculate the Jacobian matrix. Normally you can use 1e-9, but it's not a rule. I set the value 0.0001 arbitrarily, but I performed some experiments changing this value. This value cannot be too high or too low because it will not express the differentiation. This value depends on the variability of your system.

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