Post Reply 
Demonstration program for using CAS with PPL
01-21-2014, 02:48 PM (This post was last modified: 01-21-2014 04:21 PM by Michael de Estrada.)
Post: #5
RE: Demonstration program for using CAS with PPL
(01-21-2014 05:05 AM)Han Wrote:  I adjusted the code to enable users to save the matrix as any CAS variable in the main program, or they can choose to also not save the result (by pressing [Esc]). Beam2_Solve() will still work whether or not the parameter 'matrix' is a string. I suppose it still has a minor drawback in that now you have to also specify which matrix to use when doing repeated calls.

When running Beam2_Main, I get the error "bad argument type" after entering the matrix name from the command line. The program halts, and the results are not output. The matrix does get created, so the problem occurs someplace after that point. The matrix name is entered with double quotes, and if I remove them the error becomes "invalid dimension." Also, you cannot enter the matrix name from the program console, because it won't accept a string and I get "invalid input." It does work, however, if I run Beam2_Solve from the command line and enter the existing matrix name with double quotes.

Edit: I found the problem. You added the string variable "m" for the matrix, which conflicted with the mass dummy parameter "m". When computing the variable s2, this caused the bad argument type error. Changing the dummy parameter "m" to "mass" resolves this problem.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Demonstration program for using CAS with PPL - Michael de Estrada - 01-21-2014 02:48 PM



User(s) browsing this thread: 1 Guest(s)