Welcome Guest! To enable all features please Login. New Registrations are disabled.

Notification

Icon
Error

Login


Options
Go to last post Go to first unread
Offline Raketenolli  
#1 Posted : 15 January 2010 18:06:43(UTC)
Raketenolli

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

Wanna join the discussion?! Login to your SMath Studio Forum forum account. New Registrations are disabled.

Offline Andrey Ivashov  
#2 Posted : 15 January 2010 18:56:54(UTC)
Andrey Ivashov


Rank: Administration

Groups: Developers, Registered, Knovel Developers, Administrators, Advanced Member
Joined: 11/07/2008(UTC)
Posts: 1,616
Man
Russian Federation

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.
Offline omorr  
#3 Posted : 15 January 2010 18:59:20(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

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:
download

Is 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!"
Offline Raketenolli  
#4 Posted : 18 January 2010 16:36:09(UTC)
Raketenolli

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
Offline omorr  
#5 Posted : 18 January 2010 18:06:39(UTC)
omorr


Rank: Administration

Groups: Registered, Advanced Member
Joined: 23/06/2009(UTC)
Posts: 1,740
Man
Serbia

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!"
Users browsing this topic
Guest
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.