Line intersections

Line intersections - An example of translation of a function from Matlab to Smath - Poruke

#41 Objavljeno: 19. 2. 2018. 06:36:00
MBe

MBe

2 svidjanja u 21 postova.

Grupa: 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 Objavljeno: 20. 2. 2018. 01:08:59
Jean Giraud

Jean Giraud

983 svidjanja u 6.866 postova.

Grupa: 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,5 KiB) preuzeto 1366 put(ova).

#43 Objavljeno: 21. 2. 2018. 17:34:53
Andrey Ivashov

Andrey Ivashov

2.345 svidjanja u 4.060 postova.

Grupa: 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 korisnika je svidelo ovu objavu
Radovan Omorjan 21. 2. 2018. 18:38:00, frapuano 21. 2. 2018. 18:58:00, sergio 21. 2. 2018. 17:53:00, Davide Carpi 22. 2. 2018. 06:14:00, MBe 22. 2. 2018. 12:41:00, NDTM Amarasekera 21. 2. 2018. 23:06:00
#44 Objavljeno: 22. 2. 2018. 12:55:14
Jean Giraud

Jean Giraud

983 svidjanja u 6.866 postova.

Grupa: 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 ?

  • Novi postovi
  • Nema novih postova