wswain

200 Reputation

7 Badges

12 years, 132 days

MaplePrimes Activity


These are replies submitted by wswain

@acer 

The main reason I've gone down this path is the units carried through within the Matrix elements don't seem to work well with certain functions such as Statistics:-Mean  hence the unit_free step and checks for reapplying later.   

The goal is to do the math and then preset the results with correct units (i.e. create variable for the combined units as a unit conformity check, strip (unit_free) to allow other packages to work on the matrix then re-apply the correct dimensions.

The final result is getting to an output with units.  (P.S., I know the Mean in this sheet is not a real mean physically for the workseheet at this stage - its a test of the package function and the call to it.

If I'm not approaching this correct, please - all help accepted.  I'd love for the units to carry through without the problems.  I do know some funtions must be unitless.

Regards,
Bill 

@acer 

Please find attached.

I am still trying to work out Matrices with units, dataframes and rTables as final outputs for presentation in a report (i.e., excel looking with Row's column headers.

Please see attached.

Based on the replies, does #mi or #mo (etc.) become MathML when enclosed in the single, left facing quotes instead of a comment via the # symbol?

Regards,
Bill

Aluminum_E_Test_Solution_-_Webpost.mw

@tomleslie 

Thank you Tom for the clear response.

I was trying to avoid the addition of the explicit "convert(%, units, 1/minute);" to get to the units desired.  I most often use the context window to change it to the units desired and let the SW handle all the conversion math.   This ensures to me that a bad conversion factor hasn't been used and I get dimensional checks.  (1/time and Hz vs. rev (cycle) get dimensional hiccups)

The main issue I was having was using " per 'rev' " as circumfrence length per revolution (rev) as units where maplesoft has rev as 2*pi radians and uses an awkward "length(radians)" unit which confuses my dimensional checking head.

I can live with 1/time where 1/"time each rev" = rev speed (not a unit, but a description).

Bill

@mmcdara 

I know that we use A*e^b*t  all the time for time series of growth or -b*t for decay.

I had always assumed the t carried the seconds.   

After posting and doing a bit more digging into the dimensional analysis ALL power exponents must be dimensionless - which makes sense.  you can't exponent time (or other) dimension as an independent variable (or as a single number either).

Therefore, b must carry 1/s to cancle the time dimension.

My recent post was about getting the coeffients and I now have the 'b' to rebuild/recast the solution with units by adding Unit(1/s) to 'b'. 

Still stumped why 'A' returned correct in the eqn form, but not correct in output = parametervalues or parametervector.

Regards,

Bill

@acer 

Understand, thanks.

P.S., You didn't comment on actually doing the nonlinearfit (or exponential fit) with a dimensioned matrix, or vectors.

Is this not possible?

I note your over-complicated statement.  Is there a cleaner way to strip or send dimensioned data into a regression solver (linear or nonlinear)?

Thanks,

@mmcdara 

Thanks, 

I've been working with output = parametervalues and output = parametervector after I posted the original.

I do get a two values.   How can I assign them back to two variables?  I tried (a1,b1):= to assign the two onto the new variables for use.  The error was saying I was trying to assign 2 variables from 1 item (the vector results)

Also, The orginal A_Const and C_Const are not assigned these results.

As additional info/question:

I also used:  ExponentialFit with output = paramatervalues.

The result showed 0.43*e^3.2854....    

the plot showed good agreement to the data - However:

The  output = parametervalues  returned [-0.8384..    3.2854..]

How could these be so different?   i.e, var1  showing as 0.43 is correct,    -0.8384..  is not.  

Thanks in advance,

Bill

@acer

As Always,

Thanks @acer

Couple questions.

I see you use the :- operator independent of a package (i.e. long form) name in front.   What does this do?  :-eval(...)

and backwards quoted =,   '='

P.S., I had problems with Units:-UseSystem(FPS)   back in Maple 2016.   I have not tried to re-use lately but was considering as a low priority change-over.  Looks like this can be part of my standard setup when using FPS

Bill

@rlopez 

Hi Robert,

 

   I recently posted a similar call (in fact I think identical except theta instead of t for the animate range variable) and had an interesting error on the range.   That was solved by forcing an evalf on the realcons Pi/2, (using the Greek Pi tablet click). 
 

  I am now interested in the vectorCaculus form.   My main interest is to visualize a vector's transformation as it applies to robotic frames and transformations.  Watching in 3D a rotation is really key than seeing a start and finished view on how the transforms work and then the math for 'exp' and Log of velocity transforms, screw, transpose, twist, wrench, etc.
 

  At the moment I am trying to see a two rotation sequence in animate where two rotation matrices are applied to the starting vector, [P].   Using simple matrix multiplication of the rotations matrices inside the arrow function for "what I think is the operation's output" of a two column vector of position for the animation - But, did not achieve the final expected position.

 

  I am wondering now if the order of operations is the problem and the frame-by-frame vector is not completing properly.
 

P.S., love discovering these tidbits, but often wonder the challenges of finding these when debugging problematic outputs.  The matrix math for frame transformations is a challenge in and of itself and I am pre-planning a proc() for the 4x4 and other transforms (skew-symmetric).  Hoping Maple has this already in a package that I've yet to discover.

 

All thoughts welcome.

 

Bill

@acer 

 

I agree with @acer that the 0 = 0..Pi/2   showed the assignment earlier to test static.

When I commented the Theta := 0 out the error still persisted.   When I typed evalf(Pi/2) it worked.

I did re-rerun with 1.) an unassign in variables tab - same error; 2.) commenting out the initial assignment-same error; and lastly 3.) incorporated the evalf(Pi/2) - worked.

 

I do appreciate the difference in the Upper Pi vs lower pi.    In most intances I started with the greek panel usage of theta and Pi. I don't often type Pi or pi, but recognize the difference.

All said, just for final thought - 4.) I took evalf(Pi/2) and removed it to force the numeric with Pi/2.0 (hint by Earl of what needed to be there) and just hit run with Pi/2 and it DID NOT Error out.

I suspect a persitence existed or maybe a typo for the pi?  I am not sure now.

It is working and I am now getting good results moving into 3D vector animated rotations.

Thank you both.  Just wanted to document for future users that may have similar problems.

 

@wswain 

@acer  @Earl

 

I just used the evalf(pi/2) and the animation sequence works.

Not sure why Acer comment didn't resolve, but Earl's evalf did work.

 

Thanks to both for the assist.

Bill

 

@acer 

 

Is 0 an appropriate cos or sin value?

 

I trialed the static version using theta = 0 and got the first frame's presentation correct by function.

I unassigned in the variable list the theta = 0 assignment.   I also just commented this assignment out with # symbol and re-ran but get same error.

@Carl Love 

 

thank you both @acer for your replies.  Very clear and helpful with improving capability and usage of Maple.

 

 Regards,

Bill

@acer 

 

Thanks again,...  Can you clarify a couple commands please and sorry if this might be elemental stuff.  I understand the convert to list for the column labels and this was probably my first error of why the array text was error'd out trying use the columnlabel option in an earlier attempt.

 

1.) The original array elements were of a text(string) type, but you use subsindets to "transform" the list elements to string.  I used whattype on the command and see both (array and list) return strings for the elements contained inside.  Why was this necessary other than just using convert to turning the array into a list argument?

    (P.S., I like the u arrow operator vs in-string tools to get the characters after 5th.)

 

2.)  Can you explain the "transformer" and "rest" arguments as to how you know a valid transformer operator (in this case 'string') and the second argumant option to "feed it" with the u->u[5..]   vs it just acting on the elements?? 

     - I presume a different substring operation could have been used to remove chars 1-4 ? 

 

Thank you,

Bill

 

 

@acer 

 

Thank You.   Great showing of the command usage to manipulate the axis.  
 

So glad you're a subject matter expert on Maple on this forum.

 

Bill

@acer

 

Thank you.  You always have the hidden gems of commands.

 

so much appreciated!

 

Bill

 

1 2 3 4 5 Page 2 of 5