wswain

235 Reputation

7 Badges

12 years, 362 days

MaplePrimes Activity


These are replies submitted by wswain

@mmcdara 

I am working through your well laid out worksheet.  The WeibullPlot reference regression function may be deduced from these background calcs.

Bill

@acer

Your response was the lead-in for me to review the mldivide command in Matlab.   

mldivide is a function that actually has logic flow to choose the solver based on the input matrix's condition.  QR (non-square), LU, Triangular, Permuted Triangular, Hessenberg, Cholesky as decided within the function itself.  For sparse matrices it has several other paths to choose from.  

I presume Maple does not have a command/function that self evaluates the matrices for condition and chooses the best solver?  I state this by seeing your response where we need to choose LU or QR, etc.

Bill

@acer 

Thanks as always Acer.  I am actually glad to learn not to use MatrixInverse for linear solutions.   Very much appreciated.

@Carl Love   I hope OP notices the DataFrame answer!

Bill

@Carl Love 

wasn't sure the OP literally meant the values (vars) in the matrix were same as indices wanting to be alphabetical.  

OP goals seem a little missing with this slight conundrum as posted.

R's,
Bill

@Thomas Richard 

 

I was able to process the tutorial Pick and Place in v2021.2 version.  I had not needed the MapleSim functionality until just recently based on work/life demands.  I am now back onto MapleSim and upgraded to v2022.2 prior to running the MapleSim tutorial for importCad toolbox so cannot answer if it worked in v2022.1.  I still need to debug the issue.

I however found in my v2021.2 version that the coordinate (B) from the tutorial is showing correct in the location during creation (flange of "top_slide"), but becomes located at the center_of_mass in the "accept and return" post review of the model.  Has anyone else seen this behaviour?

Per the tutorial, item "i. A Rigid Body Frame connecting B to the CoM of top slide." is incorrect.  Selecting the port B shows the coordinate Triad at the CoM location in 3d workspace vs the flange center.   I note the Z dimension in the R vector (of RBF) for port B properties to be incorrect, but I cannot manually change.   This causes an incorrect connection of the two parts.






The CAD Tool's (double click from workspace on "top_slide") measurement tool works and provides the correct dimension to the B coordinate which is what I was trying to enter manually. The Triad is in the correct place.   Again, when Cad Tool is closed the triad and Z dimension are in wrong location.  Can this be changed or corrected manually?

Any assistance greatly appreciated.
Bill    

@tomleslie 

Thanks Tom,

   You hit the mnail on the head of concerns.  My intuition is to put as much local scpe of what is needed without referencing higher scope, esp. globals unless necessary.

   This is probably a lingering concern from my early days of straight coding.  Making sure parameters outside a procedure and function have some serious consequences if not managed well (IMHO).  I use globals for static items like "universal gas constant" but always concerned of how they get passed into a procedure or function and made avialable within the local scope.

    I'm probably showing the limited programming capability for large efforts, but I get buy and am growing unique functions (procs) based on our specific engineering goals.

Your info is greatly appreciated.

Bill  

@acer 

This is very helpful.  Just to close any other thoughts, if the with command is invoked at the worksheet level AND the uses command is implemented withing the proc of the same package - is there any problems?

Thanks,
Bill

@acer 

As always.  Thank you.

I had updated the code to initiate the variable, but was waiting to see the reply before running.

Found a couple "minor" typo's and got the debugger working where I also found a syntax problem, [ ] needed versus () for matrix index, causing the grief.   

Regards,
Bill

@Carl Love 

Thank you for replying and that you use these. 

I used error in my decription for ease of reading.  The variable is actually error_now and compared to error_tol set.

I am not sure why when I tried to change the execution group to Maple Input (with F5 and by the pull down) and it kept responding as in 2-D mode even though it said "maple input" in the bar.

I went ahead and created a code block to ensure 1-D entry and the operator took.

However, I am still getting an error.   (Not pretty code yet) as I'm trying to fix the recursive while loop flow problem and havent applied the vector to run through.  Please find:

Trial := proc() 
    
    local y2, test1, iterations; 
    y2 := Vector(5, fill = 0.); 
    y2[5] := 1; 
    test1 := 1.0; 
    
    while 1e-5 < test1 do
        test1 /= 2.0; 
        ++iterations; 
    end do; 
    
    test1; 
    iterations; 
        
    end proc;

Trial();
Error, (in Trial) recursive operator assignment

It seems like valid code iterative calculations.  Any assitance greatly appreciated.

Bill

@Carl Love 

@tomleslie 

As to what am I trying to accomplish?  I often do not know when I run into MATLAB commands that are unusual like "deal".  I appreciate the response about why it exists as the reply was exactly in the direction I was thinking and you've both helped clarify.

Kind Regards,
Bill

 

@tomleslie 

This is helpful.   I love Maple for its math capabilities.  I struggle with converting the documents into professional reports for delivery to the customer with the embedded math, but hiding the commands such as restart and the set-up like "with(XXX)", or UseUnits, etc.

Bill

@tomleslie 

It looks like the answer still requires the command "convert" which I was trying to avoid as combersome looking for a report, but I'll go for hiding this.  The context menu doesn't seem to allow the same conversion as stipulated via the convert command.

K/R,
Bill

@Joe Riel 

I am struggling as I'm kinda used to the regular debugger of ifort, MS C++, etc. with pretty easy controls of walking through of loops and function levels to finally find - maybe a simple syntax call error.

I'm finally really using Maplesoft in a more coding level and find the stepping through debug a challenge.

I used your example and see how that kicked open the debugger (thumbs up).   The next thing was to assign i:=1 to restart and begin single stepping.  In this simple case the problem identifies pretty quick.  But, I could not iterate one at a time to watch the flow from 1, 2, 3 - boom, which on a much bigger process loop may not be so obvious.

Am I missing something in how to do this?

Thanks,
Bill



 

1 2 3 4 5 Page 1 of 5