PaulNewton

65 Reputation

3 Badges

2 years, 265 days

MaplePrimes Activity


These are replies submitted by PaulNewton

I believe the answer lies in 

'onapprove' = Shutdown("true"), 'ondecline' = Shutdown("false")

@Carl Love 

Thank you Carl - the examples you gave are most helpful and your explanation was spot on (as was @acer)

@acer 

Thank you for your help.

Btw, on my Maple 2022.2 the parser does not like the semicolon (statement terminator) that follows immediately after  proc(pA).

Explained by Carl in his answer ...

@acer

Thank you for your reply and clarification.  In my case the matrix M was created using the ImportMatrix function.  However, the reason I was confused was because a read of a file saved in Maple language format (i.e. any extension except .m restores the variable(s) and the variable appears immediately in the variables palette.

A read of a file saved in Maple internal format (i.e. .m extension) restores the variable but it does not immediately display in the variables palette.  It does appear in the variables palette after issuing M;

@Joe Riel 

Thanks for the explanation.  I took your suggestion to use DocumentTools:-GetProperty("ComboBox0", 'selectedindex') to return a 0-based index that you can then increment by one and use as a row index into the Matrix and it works beautifully.

Thanks again for all your help.

Many thanks @Joe Riel 

I tried your code and at first it gave an error but that turned out to be a problem with the Excel data (some cells had comments which seemed to mess things up).  All is working well now.

My own effort (presently commented) is in the attached Maple Document and I have also attached the Excel data.   Your own solution is much more elegant than mine but there is something I would like to understand about mine

If you uncomment my code and Execute the Worksheet you will see that a lot of extraneous output is generated even though all lines that would normally echo output are ending with a : (colon).  Do you have any idea why?

Many thanks

Dissociation_constants.xlsx

Maple_Combobox.mw

@Joe Riel

I'll probably go with your suggestion of parenthesizing the constants after the name:  "some acid (3.14)"..

The source data could come from either a DBF database or an Excel spreadsheet.  How would I go about populating the Combobox from that data?

@Joe Riel 

Thanks for your suggestions and I'll play around with them, but am hoping (probably in vain) for a better solution

@acer

I should have realised that because the Worksheet used "with (plots)".  Now that I have got this far, with a great deal of help from you, I can work on customising the plot (title, legend, gridlines etc) and then superimpose a second plot for a different value of Ka (i.e. a different acid).

Your help is really appreciated.

@acer 

Do you have any idea why I am getting this instead of seeing the plot

Document_-_Calculation_of_pH_from_known_values_of_Vb.mw

@acer 

Many thanks for spotting my mistake and for the cut and paste of the pretty-printed output tip ...

@acer 

I don't think I managed to attach the files - I chose the files and clicked on upload.  Do I have to Inser link or content as well?

@acer 

Thank you for an extremely helpful and informative answer.  I have started the conversion but have one line which is generating an error, even though it is identical in the original Worksheet and the new Document (taking your advice). I am attaching both in the hope that you may be able to explain why the Document is giving an error.

Such a conversion mechanism could be encoded in a reusable Maple procedure -- but not by me in the next few weeks.

Made me chuckle ...

I think as suggested it must be an Excel or OS issue.  I am not going to wory about it because I can do withouit it.  Thanks for your suggestions.

1 2 3 4 Page 3 of 4