SMath Studio Forum
»
SMath Studio
»
Bugs & Problems
»
for loop less exact or some other issue?
Rank: Newbie
Groups: Registered
Joined: 15/01/2010(UTC) Posts: 3 Location: Speyer, DE
|
I find that doing a for loop and placing results of a function as elements in a vector, using vector elements as input, does not yield the same results as doing the calculation outside of the for loop: Is there an accuracy issue or am I completely missing something? ca[i is not modifying cA. I might as well put 1.1584 for cA, it will give the same results. Oliver
|
|
|
|
Rank: Administration Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member Joined: 11/07/2008(UTC) Posts: 1,616 Was thanked: 1978 time(s) in 666 post(s)
|
Please, can you provide us a file you are working on? I need it because I don't know how you calculate "bF", why "y" is a vector and etc.
|
|
|
|
Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 Was thanked: 318 time(s) in 268 post(s)
|
Hello, I can not reproduce this, and do not see anything wrong in your picture (although it is not complete). Here is the picture: And the file: downloadIs there any covered region that could not be seen maybe? Try to delete complete for loop and type it again. Regards, Radovan Edited by user 15 January 2010 19:03:17(UTC)
| Reason: Not specified |
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
|
|
|
Rank: Newbie
Groups: Registered
Joined: 15/01/2010(UTC) Posts: 3 Location: Speyer, DE
|
Reopening the file today, I found that there were parentheses around the 1+\frac{4 SF}{pi bF t[i} that are not visible in the screenshot above.
Now everything works fine.
Oliver
|
|
|
|
Rank: Administration Groups: Registered, Advanced Member Joined: 23/06/2009(UTC) Posts: 1,740 Was thanked: 318 time(s) in 268 post(s)
|
I think there might be a bug here. Please look at the picture. It might be a bug or something which is hard to deal with. I saved and reopened the file but parenthesis did not appear. On the other hand, if we are not careful with selecting operands we might get the same on the screen but the different results. Here is an example: This one is: range(1,3)*2=mat(2,4,6,3,1)on the screen: range(1;3)*2=mat(2;4;6;3;1)This one is: range(1,3*2)=mat(1,2,3,4,5,6,6,1)on the screen: range(1;3*2)=mat(1;2;3;4;5;6;6;1)Regards, Radovan |
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!" |
|
|
|
SMath Studio Forum
»
SMath Studio
»
Bugs & Problems
»
for loop less exact or some other issue?
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.