Mike Mc Dermott

Michael McDermott

95 Reputation

3 Badges

17 years, 288 days
Self Employed
Circuit Analysis Engineer
Kokomo, Indiana, United States

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are questions asked by Mike Mc Dermott

why does the command Matrix(2, 2, undefined) create the following

Matrix(2, 2, [[undefined(1, 1), undefined(1, 2)], [undefined(2, 1), undefined(2, 2)]])

instead of simple undefined for each item?

with(Optimization):
expr_optimize := fSW__Ratio_Tol[XU5]*f_ratio__SpreadSpectrum[XU5]*(R34^2*k1__RT[XU5] + R34*k2__RT[XU5] + k3__RT[XU5])/R34^2;
seqUnknownRanges := R34 = 5.640*10^4*Unit('Omega') .. 6.160*10^4*Unit('Omega'), k1__RT[XU5] = 4.054*10^4*Unit(1/('s')) .. 4.054*10^4*Unit(1/('s')), k2__RT[XU5] = 1.593*10^11*Unit(1/('F')) .. 1.593*10^11*Unit(1/('F')), k3__RT[XU5] = -2.645*10^15*Unit('m'^4*'kg'^2/('s'^7*'A'^4)) .. -2.645*10^15*Unit('m'^4*'kg'^2/('s'^7*'A'^4)), fSW__Ratio_Tol[XU5] = 0.950 .. 1.050, f_ratio__SpreadSpectrum[XU5] = 1 .. 1.250;
NLPSolve(expr_optimize, seqUnknownRanges, 'useunits', 'method' = 'modifiednewton', 'optimalitytolerance' = 0.101);

NLPSolve returns this message "Warning, convergence is not assured; examine Hessian values, or consider raising tolerance"

How can I capture this message in a procedure and take appropriate action?

I would like to read data from a google sheet document. I can download a local copy to excel format, but then I'm no longer tied to the origional file.

The netlist in the attached Maple file will not solve. 
It will solve if I remove

.CONS Vx=v[D]-v[S]
.VARS Vx

from the netlist.

Syrup returns a 2 element list of [eqs, vars] that can be easily solved using the solve command as shown in the attached file

ModelDebug.mw

The following code is attempting to pass 'debug' through 2 procedures

p1 := proc(a, b, {debug::truefalse := false}) print("p1", debug); a + b; end proc;
p2 := proc(a, b, {debug::truefalse := false}) print("p2", debug); p1(a, b, 'debug' = true); end proc;
p2(1, 2, 'debug' = true);

The result I get is 
 

                           "p2", true

                          "p1", false

                               3

How can I get the value of debug in my call statement to p2 to be passed to p1?

Thanks

1 2 3 4 Page 3 of 4