wswain

235 Reputation

7 Badges

13 years, 138 days

MaplePrimes Activity


These are questions asked by wswain

Hello,

   A question on programming Procedures (proc).

   What is the best, or most common method, to invoke packages within proc or at the worksheet level?

   I have always been confused about Proc scope for packages.   I use Scientific Constants a lot.   It and several other "with(package)" are part my main loaded pakages right after restart command.   LinearAlgebra is another common used package.

   It has been a question for me of whether to implement a "with()" statement inside of the proc to bound the scope or ensure it is seen/available by the procedure for the available commands inside the packages.  

  All thoughts appreciated.

Thanks,
Bill

Hello,

    I am regularly using tabled data for things like material properties, or other tabled look-up data from induustry or custom datasets.

    I have not used workbooks within Maple and yet see that exel files or other data sets can be "connected(?)" in the workbook tree.  Is this helpful?

    What is the best practice view of connecting to DB data and looking up variables that repeat project to project or worksheet to worksheet - without pulling into memory the full datasets for each ref call?

All thoughts appreciated.   

P.S., Tables vs. dataframes are a slight confusing matter also.  The access to the cell info seems different based on dataframe/table/matrix type.  I have no problems with matrix element access.

Thanks,
Bill

Does anyone use the /= assignment operator?

I am trying to do a

while error  > error_tol do

sequence of ops,

# update error from last loop
# simple example of assignment test 

error /= 2;    #to simulate decreasing error each loop.  Real equation on RHS is error(i) = error(i-1) + comparison of last iterates.

# Real operator assignment I'd like to use is error += comparison

end do;

the divide / keeps applying as the single divide and a long line under the variable before I can type =.   This happens in both 1-D and 2-D.   The "Operator Assignments" help page doesn't have a lot of help on syntax problems using these. 

Thanks,
Bill

Hello,

    Has anyone produced a MATLAB command read across?   I was reviewing some MATLAB code for the approach to the proc being written for similar functionality.    They used a command "deal" as a way to distribute a Matrix sizing across multiple Matrix variables at once. 

      -> I.e., EOM matrices of MASS, DAMPENING, And STIFFNESS are all equal size set once initial size is declared with mass being first by number of elements and then the deal function to propgate the sizing to the X, X_Dot, Etc. and other matrices as one definition line assigned to many matrix variables.

   I am not a Matlab coder to know why this command "deal" even exists as it seems quite possible to do this in a couple lines or "I think" with the XX_New := copy(Matrix_basic) maple lines.

  I seem to always have to find the read across when updating or using Matlab function codes with a new Maple project.  I loath retaining the matlab language.  Sorry MathWorks folks.

   P.S., Is the maplet the only menthod to get input from a user at time of running the worksheet.  the "Input" command in other languages has the built in window for user entry.  I find the GetInput, InputDialog, or other via maplet a bit cumbersome and code intensive (esp. tracking the instantiation handle for the interaction.  I also found the return of "list" and "symbol" to be problematic for a simple "get integer" request.

Regards,
Bill

Hello,

Attached is a simple worksheet dealing with units and angular motion.   I need to reverse calculate from an acceleration to the uniform motion (rad/sec or RPM) which is used in forces and FEA simulation.

The initial units work fine and get to a velocity (feet/sec) but then fail to convert to rad/sec or RPM.   The attached shows the results of units Hz (1/sec) and the problems with resolving to RPM or rad/sec.   the unit (length / length (radius)) as an answer stil confounds me.

Uniform_circular_motion_units_issue.mw

Any help greatly appreciated,
Bill

1 2 3 4 5 6 7 Page 2 of 7