[Dev] Strange error message from cross product

[Dev] Strange error message from cross product - Messages

#1 Posted: 8/20/2017 6:12:37 PM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

Hi,

The expression a*(vectorize(λ* b )†c) displays correctly, if directly written to a math region, also if it is wrapped in Maxima(). Maxima doesn't do a lot here, all is done on the SMath side.

However, if it is used in a definition, then SMath complains about wrong arguments for the cross product.

How can I avoid this?

2017-08-20 22_36_36-SMath Studio 0.98.6398 - [Plugin Maxima Test.sm_].png
Plugin Maxima Test.sm (450 KiB) downloaded 36 time(s).
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#2 Posted: 8/20/2017 9:38:24 PM
Jean Giraud

Jean Giraud

983 likes in 6866 posts.

Group: User

Assuredly, the 1rst expansion is correct in the Smath native vector algebra.
It reminds me Tom G. [Mathsoft Collab] reported Mthacad 11 x product was
different than in previous Mathcad 2000.
#3 Posted: 8/23/2017 7:11:18 AM
Davide Carpi

Davide Carpi

1416 likes in 2873 posts.

Group: Moderator

As for my point of view, the wrong thing is the result given in (vectorize(λ*a))†b; since λ is unknown (and there fore type of λ), vectorize() it should be hold in the formula until will be defined.
Just think if I'd like to use a vector as λ:

2017-08-23 12_09_07-SMath Studio 0.98.6398 - [Documento5_].png
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
#4 Posted: 8/23/2017 7:50:11 AM
Martin Kraska

Martin Kraska

1222 likes in 2150 posts.

Group: Moderator

I think the given symbolic engine of SMath assumes scalars for all variables unless they have a non-skalar value. It would be convenient to have some type declaration objects (along with some symbol decoration), but as long as we don't have them, we can't expect symbolic vector equations to be handled correctly.

Section matrix operations symbolic.sm (16 KiB) downloaded 32 time(s).
2017-08-23 12_46_39-SMath Studio 0.98.6398 - [Section matrix operations symbolic.sm].png
Martin Kraska Pre-configured portable distribution of SMath Studio: https://en.smath.info/wiki/SMath%20with%20Plugins.ashx
#5 Posted: 8/23/2017 8:24:02 AM
Davide Carpi

Davide Carpi

1416 likes in 2873 posts.

Group: Moderator

Wrote

I think the given symbolic engine of SMath assumes scalars for all variables unless they have a non-skalar value.


Maybe, but here is some side effect of the evaluation operator (=) RHS evaluation logic (just a guess, I have to check it with the debugger).
A normal assignments works as I'd expect:
2017-08-23 13_17_11-SMath Studio - [Page1_].png


Wrote

It would be convenient to have some type declaration objects (along with some symbol decoration), but as long as we don't have them, we can't expect symbolic vector equations to be handled correctly.


I agree with you, maybe a dedicated multiplication operator for matrices (standard multiplication = 1 or both the arguments are assumed as scalars; matrix multiplication = both the arguments are matrices/vectors).
If you like my plugins please consider to support the program buying a license; for personal contributions to me: paypal.me/dcprojects
  • New Posts New Posts
  • No New Posts No New Posts