Line intersections

Line intersections - An example of translation of a function from Matlab to Smath - Сообщения

#41 Опубликовано: 19.02.2018 06:36:00
MBe

MBe

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

Группа: User

Hello Everybody,

Thanks to all of you for these extremely interesting postings.
I am barely able to fully understand them in depth... I need a bit of time to study them thoroughly.
Programming is like making music, and this is a symphony!!

Once again, thanks for all these good suggestions.

Marco
#42 Опубликовано: 20.02.2018 01:08:59
Jean Giraud

Jean Giraud

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

Группа: User

Wrote

Still on line intersections.
Bug corrected: only lines with same number of points were accepted.
Now lines with different # of points will work.
Also some improvements in efficiency so that runtime is now
approx. -25%.



Marco, your Line Intersection is a piece of gold for Engineering works.
1. Trifolium
2. Dragilev implicit solve
3. Focus [suggested as next exercise]

Zillions thanks ... Jean

Maths InterX.r1 (2) Trifolium Copy.sm (103 КиБ) скачан 77 раз(а).

#43 Опубликовано: 21.02.2018 17:34:53
Andrey Ivashov

Andrey Ivashov

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

Группа: Super Administrator

Wrote

Just take a look at the speed:
plotG_2.PNG



Wrote

For such uses it would be good if the augment and stack functions could expand scalar arguments (or more generally any arguments not matching the maximum number of rows or cols) to uniformly populated vectors of the required size).



This is what I've got after improving stack/augment (see SMath Studio 0.99.6626):

plotg_improved_1.PNG

Note, that I had to make height of the result matrix about 40 times larger to see the same time! This means that this syntax of stack/augment is about 40 times faster then without it.

Thank you!
6 пользователям понравился этот пост
Radovan Omorjan 21.02.2018 18:38:00, frapuano 21.02.2018 18:58:00, sergio 21.02.2018 17:53:00, Davide Carpi 22.02.2018 06:14:00, MBe 22.02.2018 12:41:00, NDTM Amarasekera 21.02.2018 23:06:00
#44 Опубликовано: 22.02.2018 12:55:14
Jean Giraud

Jean Giraud

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

Группа: User

Wrote

This is what I've got after improving stack/augment (see SMath Studio 0.99.6626):


Looks great, not reproducible 6179.
Could it conflict in other situations ?

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