wswain

185 Reputation

6 Badges

11 years, 27 days

MaplePrimes Activity


These are questions asked by wswain

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

Hello,

     Can you enter debug in a worksheet vs a proc?   

    I have a for loop that is crashing in the middle with a bad calculated number to provide to a thermoprops function.   Is there a way to single step through a for loop (1500 iterations) to see which line is getting tripped up?  I can not post the worksheet as it's private development.   The question is generic to any "for loop".

   I have also tried "porting" into a code edit region, but still can not enter the debugger mode.   Is proper debugger only available if I turn the "for loop" into a proc?   If yes, what is the availability of packages called right after restart for the worksheet for a proc, or do all the pre-calcs developed in the worksheet and the packages to be variables fed into the proc or packages re-declared insde a new proc ???

  Sorry if this is a trival question.

Thanks in advance,
Bill

Hi,

Happy New Years All

Can anyone explain two document formating features I am trying to implement?

1.)  Sections.  I select numbering with follow previous selected and I get three sections with a 1. in front of them vs 1, 2, 3.  

 

I would expect Technical to become 3.1 when properly following Section 3. header.   Also, I have seen how to manually type the section number, but that seems to defeat the document layout and formatting if it gets "jumbled up". 

2.)  Headers.   Can you suppress headers on pages 2 through X to have a unique cover page header?   This would be similar to word (headers and footers linked to previous section, or not(?) with section breaks as new pages)

Thanks,
Bill

1 2 3 4 5 Page 1 of 5