mmcdara

4296 Reputation

17 Badges

6 years, 242 days

MaplePrimes Activity


These are replies submitted by mmcdara

@Carl Love 

Don't you mean 
plots:-display([entries(IP, nolist)])
or
plots:-display(entries(IP, nolist))
?

But maybe the 'nolist' option is the default choice in the newest Maple version

@Filippo

Your first case is treated here in a more complete way (two resampling methods and a lot of additional plots including confidence interval on the prediction)

NonlinearFit_CorrelationMatrix.mw

Here is your second case.

NonlinearFit_CorrelationMatrix_Model_2.mw

BTW: I realized I didn't answer your two final questions :

  • Also, is there a command that returns the errors for the variaous fit parameters? (i.e. a,b,c,d)
    Answer is NO

  • Or at least, someone knows the methods and formulas to find them?
    Answer is YES, there exist methods to find them, but NO, there is no formula in the general case
    (unless you can find a transformation that linearizes the model w.r.t. the parameters)

@Q190504 

Thanks @vv, I did nothing

@acer 

It(s likely I didn't read the full question and focused on the many simplification attempts.

@aribitoye 

Here is an edited version of the worksheet I already sent you.

My_Interpretation.mw

In particular you will see how to use Optimization:-Minimize for future needs.
The main problem comes from the fact that K is to be an integer and that NLPSolve doesn't handle integer variables.
So a strategy could be to find the minimum over (A, M) for any integervalue of K in some range 0...Kmax (see the file above).


Watchout, Optimization:-Minimize is extremely slow and I think that using it requires some preliminary simplifications of the function to minimize (if possible).

The error message seems quite clear (Maple 2015.2)

Error, (in pdsolve/numeric/process_PDEs) can only numerically solve PDE with two independent variables, got {r, t, z}

Your pde contains 3 independent variables t, r, an z and Maple can't handle this.

REMARK: event the stationnary problem (a Laplace equation in axi-symetric cylindrical coordinates) cannot be handled by Maple (2015.2) 
Error, (in pdsolve/numeric) unable to handle elliptic PDEs

@acer 

And I've deleted mine.

Good point for seeing that it was volts.
I vote up

@Q190504 

Maybe the notation A:=B+1; is a little but confusing (I didn't even know that it would give the expected result) ?
So write it this way

local I:
LinearAlgebra:-InentityMatrix(3):
B := <0,-2,1;-1,0,0;-2,0,0>:
A := I+B:


Then 
If A = I +B then
A^n = I + n*B + n*(n-1)/2*B^2 + n(n-1)*(n-2)/6 + .... B^n
(apply to a sum of matrices what you do for a "simple" sum)

Observe that binomial(n, 1) = 1, binomial(n, 2) = n*(n-1)/2 and so on.

Now @vv showed that B^3 = 0 ==> B^4 = B.B^3 = 0 ... ==> B^p = 0 for each p > 2.

Thus   A^n = I + n*B + n*(n-1)/2*B^2 + n(n-1)*(n-2)/6 + .... B^n  =  I + n*B + n*(n-1)/2*B^2
Or 

	
'A'^n = I + n*B + binomial(n,2)*B^2


 

@Thomas Richard 

I didn't know about this function.
I'll have a look at it as soon as I get back to my office.
Anyway, thanks for the tip.

@Thomas Richard 

Here is an example when "capturing" this information could be useful.
Suppose you have a file foo.mw which contains the definition of a module named foo  and a command 

savelib(foo, "foo.mla"); 

You execute the worksheet foo.mw at date T.
How can you be 100% sure that the foo.mla you use at date T' > T has been created from the foo.mw that existed at time T?
To  answer this question I decided years ago to "programatically capture" the name of the worksheet foo.mw within this procedure, its modifaction (through FileTools) and the name of the operator (ssystem("whoami")) and augment the archive foo.mla  with the informations.

 Taches  := ssystem("tasklist /V /FO ""LIST"" "):
 MaTache := StringTools:-StringSplit(Taches[2], "javaw.exe")[2]:
 MaTache := StringTools:-StringSplit(%, "Maple 2019")[1]:
 MaTache := StringTools:-Squeeze(MaTache):
 MaTache := StringTools:-StringSplit(MaTache, "fenˆtre: ")[2]:
 MyWS    := StringTools:-StringSplit(MaTache, "*")[1]:
 MyWS    := StringTools:-SubstituteAll(MyWS, "\\", "/"):
 WSepoch := FileTools[ModificationTime](MyWS):

 Seed  := randomize():
 GenID := StringTools:-Random(20, "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"):
 INFO := table([
     "CreationDate"       = StringTools[FormatTime]("%Y.%m.%d_%H.%M.%S"),
     "WorksheetName"      = MyWS,
     "WorksheetEpochTime" = WSepoch,
     "Author"             = op(-1, ssystem("whoami"))
 ]):

 LibraryTools:-Save(INFO, "foo.mla"):

By the time I couldn't find any versioning tools that were secure enough to guarantee the link between  foo.mw and foo.mla.

The weak link in my strategy is that you heve to save foo.mw before executing it and thus creating foo.mla.

@acer 

Very nice solution, I vote up!

I was working on a solution based upon RegSub/RegSubs.
Both of these functions seem very powerful but I find their help pages somewhat obscure.
Could you give me some hints on how they work?

TIA

@dharr 

Hi,
You're right, the qolution is OS-dependent.
For instance, for years I use the trick I explain in my answer to @mjc .

A priori, an equivalent strategy could be based on this command if you use a Linux machine, but I never checked this.

xprop -id $(xprop -root -f _NET_ACTIVE_WINDOW 0x " \$0\\n" _NET_ACTIVE_WINDOW | awk "{print \$2}")

The thing is it doesn't work on Mac OSX (_NET_ACTIVE_WINDOW is unedfined) and I never found out how to reproduce with Mac OSX what I do with Windows (no clear equivalent to tasklist).

Maybe this can give you some ideas if you want to go further

@tomleslie 

Thanks for your reply.
At least this shows that there is no version issue.

@tomleslie 

"and there is probably not much you can do about it!"
You're wrong, simply the resolution of hyperbolic pde requires a minimum of precautions.
I invite you to consult my answer.

Nevertheless, I do acknowledge that there may be a version problem (2015 = 2020 <> yours).

@Athar Kharal 

See my answer from my home login @mmcdara.
When I was at the office (@sand15) I used Maple 2020 and it worked just fine (like Maple 2015 if I'm not mistaken).

1 2 3 4 5 6 7 Last Page 1 of 96