SMath Studio Forum
»
SMath Studio
»
Samples
»
Error when creating Matrix from a FOR-LOOP
 Rank: Newbie
Groups: Registered
Joined: 21/11/2014(UTC) Posts: 1
|
I'm having trouble with this code: InvestmentPrediction-mTrials-r1.sm (26kb) downloaded 7 time(s). which creates a vector (ultimately it will be a 2d matrix) from a nested FOR-LOOP pair. It keeps returning an error (Result is above the max allowed positive number) after about 5 runs through the FOR_LOOP. I have verified that the result is not a large number -- it's less that 1,000 as you can see for "Val" near the bottom of the first page. I'm left to conclude that the maximum number has something to do with the index of the vector "Val". But I can't find anything in the literature indicating that there is some limit to this index. After weeks of reading and trying variations I've just about run out of ideas. Can you help me understand what I'm doing wrong?
|
|
|
|
  Rank: Advanced Member Groups: Registered
Joined: 23/12/2012(UTC) Posts: 96  Was thanked: 171 time(s) in 134 post(s)
|
Hi Mike, Try to put "numerical optimisation" over your formulas. Regards, Ioan |
Do to others as you would like them to do to you! Knowledge is of no value unless you put it into practice - Chekhov |
|
|
|
  Rank: Advanced Member Groups: Registered
Joined: 23/12/2012(UTC) Posts: 96  Was thanked: 171 time(s) in 134 post(s)
|
Hello Mike,
1. I received your private message, intended to be an answer to my post #2. I conssider as suited to copy it here:
"Hello ioan,
Thanks for the quick reply. But I'm having trouble with this new (1.3.0.9126) version of Smath. There doesn't seem to be any Optimization "switches" of any kind in any of the tabs. It seems that the only control I have is the use of the equal sign (=) for numerical, or the arrow for symbolic. Both of these are in the side panel. All of the posts that I've seen are for other versions of Smath; the controls described on those posts don't exist on my version.
I'm also having trouble navigating around the Forum. I found out, just by accident, how to post my original question (that you graciously answered). But now I can't figure out how to continue the thread. That's why I'm responding to your answer via this "Private Message". How do I properly respond to your response.
Can you provide any insights on how to do these things? Where do I find instructions on how to better make use of Smath, and the Forum as well?
Thank you for your help so far. Cheers, Mike." 2. We all started as beginners with SMath. So, never mind, there are always some peoples willing to help.
3. In order to answer on a post, look upside of the first topic and press the button "Post Reply", as here:

4. As about “optimization mode”, you cans specify your option for the whole program, by selecting (Ctrl+ A) all the content and then right click the mouse and precise yous option, as here:

Hope being helpfully, Ioan |
Do to others as you would like them to do to you! Knowledge is of no value unless you put it into practice - Chekhov |
|
|
|
SMath Studio Forum
»
SMath Studio
»
Samples
»
Error when creating Matrix from a FOR-LOOP
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.