acer

32405 Reputation

29 Badges

19 years, 346 days
Ontario, Canada

Social Networks and Content at Maplesoft.com

MaplePrimes Activity


These are replies submitted by acer

@beidouxing There are a few instances of what appear to accidental function application rather than say addition or multiplication, due to missing arithmetic operations in the formula you posted as 1D Maple Notation.

For example,  (x^2+1)^2)(-(3/2)*...) is going to become a function call of (x^2+1)^2) rather than some product or sum (or whatever you intended).

Depending on how I interpret these I can see some different solutions other than just x=y.

@wolfman29 Sure.

expr := .956^2-PpRM(s, .185)-PkRM(s, .895):
fsolve( unapply( expr - 1.4, s), ... );

where you might still want to give it a hint about the domain in which to look. Hence my `...`, which you would replace.

By the way, you may not have done anything strictly speaking wrong in your original attempt. There is a case where a mix of constants and expressions containing procedures runs amok of an (over)aggressive check by fsolve. Turning the thing into an operator (unapply) makes it go another route.

@Preben Alsholm Thanks for the relevant comments.

The derivative-free method=nonlinearsimplex option to NLPSolve might also help, in some cases.

@Alejandro Jakubi It could be a serious drawback if all formatting, sectioning, Tables, and embedded components would be lost by such an action.

That's on top of how robust the .mpl export may or may not be. (What does it dig into, or not).

 

@Axel Vogt I used vi and (just a little) Chrome.

It's disappointing that the Maple GUI itself cannot do a much better job of recovery.

@Soldalma I believe that accepting an answer is done by clicking on the chalice/cup/goblet/grail image that appears in the right of the header (below the thumbs-up and star).

Make sure that you remove (just) those added lines from the file you edited under bin.X86_64_WINDOWS.

@Soldalma When you copied the file from bin.xxx to homedir location you kept other lines in it? The file "C:\Users\Fernando\maple.ini" should contain only valid Maple commands. It sounds to me as if you have inadvertantly copied over some preferences file.

I suggest leaving all files under bin.xxx alone, and never edited. Have the file "C:\Users\Fernando\maple.ini" contain only valid maple commands, such as the ones you wanted. Those line are read as 1D Maple Notation commands and should end in a semicolon (if you want the results echoed) or a colon (if you want them executed silently).

@kle8309 While the goal of "easy ways to use units" is important, the Units:-Natural subpackage was not a great idea. When loaded it simply takes away far too many common names and symbols from other uses.

But you can still use convert(..,units,..) in the following way for this example, with Units:-Natural loaded.

restart:
with(Units:-Natural):
convert( Unit(m^2*kg/(s^4*A)), units, :-`/`(V,us));
convert( Unit(m^2*kg/(s^4*A)), units, 'V/us');

@maple fan In this case "hybrid" means a hybrid of both hardware and software floating-point precision, not a hybrid of numeric and symbolic methods.

@maple fan You've found a bug. It only goes wrong when Digits = floor(evalhf(Digits)). In Maple 12.02 that means when Digits=14 for MS-Windows, and in Maple 18.02 it means when Digits=15.

I will submit a bug report.

At higher or lower values of Digits I have not yet seen a problem.

restart;
Digits:=floor(evalhf(Digits));

                                Digits := 15

with(LinearAlgebra):
A:=Matrix([[1,3],[2,5]],datatype=float):
b:=Vector([1,1],datatype=float):
infolevel[LinearAlgebra]:=5:
LinearSolve(A,b,method=hybrid);

  LinearSolve: using method hybrid
  LinearSolve: using method hybrid
  LinearSolve: calling external function
  LinearSolve: NAG hw_f07adf
  LinearSolve: NAG hw_f07aef
  LinearSolve: CLAPACK sw_dgerfs_
  Error, (in SWcallhybrid[1]) param 4 should be an rtable

kernelopts(version);
          Maple 18.02, X86 64 WINDOWS, Oct 20 2014, Build ID 991181

@Bryon The tags "linear_algeba" and "thank-you-mapleprimes" could go...

I see nothing unfriendly about your question.

I suspect that you're right -- it need not be coded that way. It might instead begin like, say,

R := Matrix(n, n, ':-shape' = ':-triangular'[':-lower']);

and end with something like,

Digits:=oldDigits:
map[':-inplace'](evalf,R);

There are lots of ways to get similar effects, of course. I suspect that we are seeing some part of the personal style of the code's author. (To me, it looks old-fashioned, almost redolent of linalg.)

I suspect that the author was not especially concerned about efficiency. The author might have felt that this is a routine more for exposition of method than for attaining maximal efficiency, being part of the Student body of code. Examples are likely not large enough or repeated often enough to make the efficiency concerns most crucial. If efficiency were more crucial here then better to operate at hardware precision. And less need to round down the result.

All the above is my best guess. I cannot prove any of it.

acer

@nm There is a separate procedure `evalf/AiryBiZeros`.

Maple has an extension mechanism, which allows evalf to utilize a custom procedure.

restart:

`evalf/foo` := proc(x) x!; end proc:

evalf( foo(3) );                    

                                       6

There are examples of this on the help page for topic evalf,details.

In my Chrome (version 25.0.1364.152) on 64bit Linux the voting toggles (upvote, favorite, best-answer) don't do anything.

acer

You have two sets of braces (nested) in your assignment to `init4`. Remove the outer ones.

acer

First 345 346 347 348 349 350 351 Last Page 347 of 593