Augmented matrix - unexpected SMath behaviour

Augmented matrix - unexpected SMath behaviour - Miscalculation of augmented matrix? - Сообщения

#1 Опубликовано: 19.07.2021 18:17:15
Jan Claeys

Jan Claeys

2 сообщений из 25 понравились пользователям.

Группа: User

Dear all,

I'm currently writing a basic cam profile generation program in SMath, see attachment below.
Today, I encountered a behaviour I can't explain:
* On the last page, I create some X and Y values
* For some reason, the calculated values in the augmented XY matrix are not correctly calculated
However, calculation is correct when I add an extra field that has nothing to do with the actual calculation (field marked in red)

What happens here?
* SMath error?
* Programming error on my side?

Thanks in advance for any feedback, I love SMath and I would like to finish the program.

Kind regards from Belgium,

Jan

Cam engine - problem.sm (73 КиБ) скачан 35 раз(а).
#2 Опубликовано: 19.07.2021 19:35:50
Alvaro Diaz Falconi

Alvaro Diaz Falconi

992 сообщений из 1674 понравились пользователям.

Группа: User

Hi Jan. The problem is that SMath try to eval functions starting with if to true or false. You can prevent that behavior with line( ), as in the attached.

Cam engine - problem.sm (73 КиБ) скачан 41 раз(а).

Best regards.
Alvaro.
1 пользователям понравился этот пост
janclaeys 20.07.2021 04:42:00
#3 Опубликовано: 20.07.2021 04:45:07
Jan Claeys

Jan Claeys

2 сообщений из 25 понравились пользователям.

Группа: User

Hi Alvaro,

Thank you very much for your feedback!
This is certainly something I wouldn't have discovered by myself: muchly appreciated!

p.s. the program isn't ready: the formulas at the last page don't create the required cam profile yet, working on it ;-)

Kind regards,

Jan
  • Новые сообщения Новые сообщения
  • Нет новых сообщений Нет новых сообщений