1 страниц (5 вхождений)
HELP WITH PROGRAM RUNTIME - NEW TO SMATH PROGRAMMING - Сообщения
#1 Опубликовано: 03.06.2023 06:52:38
I am new to SMATH as a previous post indicated. I really need help with programming.
Here is a program I wrote several years ago. It takes almost 20 seconds to run. Scroll down to the section with the nested for-loops in the program. It is a program for coupled finite difference equations.
Файл не найден.
When I was working on this, someone on the forum modified the code as follows so that it runs instantly. I cannot find the difference because I pasted in from this program its nested for-loops to the above one and got no improvement in runtime. What is the difference?
Файл не найден.
I am trying to get this much simpler program to run. It seems to be in an endless loop. At least it hasn't finished after several minutes. In Mathcad 15 it runs instantly. I tried to copy the syntax from the above program. Where am I going wrong?
Файл не найден.
Thank you for any help you can give.
Reg Curry
Here is a program I wrote several years ago. It takes almost 20 seconds to run. Scroll down to the section with the nested for-loops in the program. It is a program for coupled finite difference equations.
Файл не найден.
When I was working on this, someone on the forum modified the code as follows so that it runs instantly. I cannot find the difference because I pasted in from this program its nested for-loops to the above one and got no improvement in runtime. What is the difference?
Файл не найден.
I am trying to get this much simpler program to run. It seems to be in an endless loop. At least it hasn't finished after several minutes. In Mathcad 15 it runs instantly. I tried to copy the syntax from the above program. Where am I going wrong?
Файл не найден.
Thank you for any help you can give.
Reg Curry
Reg Curry
Loveland, CO
#2 Опубликовано: 03.06.2023 13:20:45
WroteThank you for any help you can give.
You can make it piece wise ... first.
Cheers ... Jean.
System of Equations (1).sm (32 КиБ) скачан 20 раз(а).
#3 Опубликовано: 03.06.2023 13:26:40
WroteФайл не найден.
SMath isn't very fast. Sometimes works putting some eval() function or choosing Optimization / Numeric, but not always.
WroteФайл не найден.
The difference is that in the first length(t) = 160 and 15 in the second.
WroteФайл не найден.
if you start the loop from j = 1, then S[j-1] is S[0], and SMath have only ORIGIN = 1.
Best regards.
Alvaro
#4 Опубликовано: 03.06.2023 15:51:35
... Project REG Unk.sm (12 КиБ) скачан 25 раз(а).
#5 Опубликовано: 03.06.2023 16:33:19
Thanks
Origin = 1 was the problem. It’s hard not to let MATHCAD affect my syntax.

Origin = 1 was the problem. It’s hard not to let MATHCAD affect my syntax.
Reg Curry
Loveland, CO
1 страниц (5 вхождений)
-
Новые сообщения
-
Нет новых сообщений