Now everything seems to work fine, but then i tried
C(b,a);
in the hope, to get the negative value of C(a,b). Nevertheless, wxmaxima hangs.
So what is going wrong?
I am running the newest version wxMaxima 13.04.0 available for osx:
System info
wxWidgets: 2.8.12
Unicode Support: yes
Maxima version: 5.30.0
Lisp: SBCL 1.0.55.0-abb03f
Thank you for any information
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Wolfgang Meiners wrote the following on 3/31/2014 5:40 PM:
kill(all);
CP(a,b):= [a[2]b[3]-a[3]b[2], a[3]b[1]-a[1]!<-- I removed this symbol b[3], a[1]b[2]-a[2]b[1]];
CP(a,b);
Yes, CP(b,a) hangs on mine too. As does CP(p,q). I don't see why you
would expect this to not cause problems, since Maxima does not know if
the arguments are lists as required. It certainly shouldn't hang. It
would be better if it displayed an error message. But it also doesn't
seem like a problem in any reasonable calculation for which the
arguments to CP are properly defined.
I am trying to understand what happens. I wrote this function - and i am not very experienced in writing programs for wxmaxima. After defining the function, i applied it to some arguments without defining these arguments. There was no problem. The following works on my system:
so there seems to be no need to define vectors before calculating the cross product. But then i tried to verify the antisymmetry of the cross product by writing
CP(a,b) + CP(b,a)
and then, the program hangs. I can write
CP(x,y) + CP(y,x);
(%o5) [0,0,0]
so this seems to be related to the call CP(b,a) where the arguments are changed. I want to understand, what is going wrong in this situation to avoid such errors in future situations.
In my opinion, the main program should not know about the arguments of the function. The inside world of the function should be opaque to the main program. But this seems not to be the case. So can i use variables a,b in the main program? Obviously not. If i could use them, CP(b,a) should work as well, as CP(a,b) does.
Wolfgang
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I wrote the following simple function which calculates the cross product of two vectors:
Now everything seems to work fine, but then i tried
in the hope, to get the negative value of C(a,b). Nevertheless, wxmaxima hangs.
So what is going wrong?
I am running the newest version wxMaxima 13.04.0 available for osx:
System info
wxWidgets: 2.8.12
Unicode Support: yes
Maxima version: 5.30.0
Lisp: SBCL 1.0.55.0-abb03f
Thank you for any information
Your function works fine on my system:
I'm running Maxima 13.04.2 on an old XP system.
Can you try
and then, without defining a and b,
the first function call (CP(a,b)) does work, the second leads to a hanging system in my version of maxima.
Wolfgang
Wolfgang Meiners wrote the following on 3/31/2014 5:40 PM:
Yes, CP(b,a) hangs on mine too. As does CP(p,q). I don't see why you
would expect this to not cause problems, since Maxima does not know if
the arguments are lists as required. It certainly shouldn't hang. It
would be better if it displayed an error message. But it also doesn't
seem like a problem in any reasonable calculation for which the
arguments to CP are properly defined.
What is it you're trying to do?
"What is it you're trying to do?"
I am trying to understand what happens. I wrote this function - and i am not very experienced in writing programs for wxmaxima. After defining the function, i applied it to some arguments without defining these arguments. There was no problem. The following works on my system:
so there seems to be no need to define vectors before calculating the cross product. But then i tried to verify the antisymmetry of the cross product by writing
and then, the program hangs. I can write
so this seems to be related to the call CP(b,a) where the arguments are changed. I want to understand, what is going wrong in this situation to avoid such errors in future situations.
In my opinion, the main program should not know about the arguments of the function. The inside world of the function should be opaque to the main program. But this seems not to be the case. So can i use variables a,b in the main program? Obviously not. If i could use them, CP(b,a) should work as well, as CP(a,b) does.
Wolfgang
I think this is a bug and therefore opened a ticket: #2715 A problem with subscripted variables
Hello Albrecht,
thank you for this confirmation
Wolfgang