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

spin does not produce correct output if tspan does not start with 0 #2311

Open
NBoulle opened this issue Jun 13, 2019 · 0 comments
Open

spin does not produce correct output if tspan does not start with 0 #2311

NBoulle opened this issue Jun 13, 2019 · 0 comments
Labels

Comments

@NBoulle
Copy link
Collaborator

NBoulle commented Jun 13, 2019

If I run the following code

S = spinop('ks');
S.tspan = 100:1e-1:101;
[u,t] = spin(S, 256, 1e-1);

I get the following output for t:

t =

   1.0e+02 *

  Columns 1 through 7

                   0   1.001000000000000   1.002000000000000   1.003000000000000   1.004000000000000   1.005000000000000   1.006000000000000

  Columns 8 through 11

   1.007000000000000   1.008000000000000   1.009000000000000   1.010000000000000

spin replaces the first entry of tspan by 0 and u{1} = u(t=0), which sounds like a bug.

However, S.tspan = [0 100:1e-1:101]; works as expected.

There seems to be a similar issue for the other spin codes (at least spinsphere).

@NBoulle NBoulle added the spin label Jun 13, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant