1 страниц (8 вхождений)
loop for routine - Сообщения
#1 Опубликовано: 23.05.2014 19:24:24
Hello:
I need help with this routine. I created a loop with while function, but it takes too long in finding a solution.
I think code its OK, but I dont know the software limitations... (I programmed the same in scilab and worked well)
Thanks in advance.
Ultimate Strength Analysis_v0.0.sm (32 КиБ) скачан 55 раз(а).
I need help with this routine. I created a loop with while function, but it takes too long in finding a solution.
I think code its OK, but I dont know the software limitations... (I programmed the same in scilab and worked well)
Thanks in advance.
Ultimate Strength Analysis_v0.0.sm (32 КиБ) скачан 55 раз(а).
#2 Опубликовано: 24.05.2014 02:23:18
#3 Опубликовано: 24.05.2014 14:24:07
WroteHello,
It seems (not sure) that your code does not change the exit loop condition and you are in infinite loop - see the picture please.
Regards,
Radovan
But why?? I tried to use a for loop, but it's the same result. First I thougth it was because of the units, so I take them away from the matrixes, but now I'm running out of ideas...

I tried doing a second loop, without for or while, but again the same...

Ultimate Strength Analysis_4.1.sm (44 КиБ) скачан 46 раз(а).
#4 Опубликовано: 24.05.2014 16:55:39
at the end of iteration, nothing changes. iteration means values you start with have to change for the next iteration. same values are being used in every iteration. same aux is being calculated every time. the loop can not end this way. at the end, i am saying the same thing that omorr have said
i hope i could help.

#5 Опубликовано: 24.05.2014 17:06:19
Wrote
I tried doing a second loop, without for or while, but again the same...
If you set all regions to optimization> numeric (in the context menu, after marking them all with Ctrl-A), then I see no problems in the attachment 4.1.
Martin Kraska
Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#6 Опубликовано: 24.05.2014 17:38:16
Wroteat the end of iteration, nothing changes. iteration means values you start with have to change for the next iteration. same values are being used in every iteration. same aux is being calculated every time. the loop can not end this way. at the end, i am saying the same thing that omorr have said
i hope i could help.
you were rigth, i forgot to redefine xIC_ini in the last else... thanks
#7 Опубликовано: 24.05.2014 17:43:21
WroteWrote
I tried doing a second loop, without for or while, but again the same...
If you set all regions to optimization> numeric (in the context menu, after marking them all with Ctrl-A), then I see no problems in the attachment 4.1.
THANKS, it was the optimization method, everithing works fine with numeric

#8 Опубликовано: 25.05.2014 02:10:20
One more example related to Numerical-Symbolical optimization. There were already many of them here on the Forum. Just to remember that Martin proposed the Numerical optimization should be the default one - not the Symbolical. On the other hand, regarding the way Smath is working I have the impression that this will not be possible and this situation of Symbolic optimization used by default will remain. Am I right about it, or not ???
Regards,
Radovan
Regards,
Radovan
When Sisyphus climbed to the top of a hill, they said: "Wrong boulder!"
1 страниц (8 вхождений)
-
Новые сообщения
-
Нет новых сообщений