Carl Love

Carl Love

28070 Reputation

25 Badges

13 years, 38 days
Himself
Wayland, Massachusetts, United States
My name was formerly Carl Devore.

MaplePrimes Activity


These are replies submitted by Carl Love

@Markiyan Hirnyk Changing the tickmarks is not trivial. In the package that I mentioned above, I devoted 250 lines of the code (and comments) just to changing the tickmarks. Of course, that was for the most general case. It easier when you know the range that you are working with.

The easiest thing to do is to decide "manually" which tickmarks you want. Let's say you have a list X of desired tickmarks. Then use option

axis[1]= [tickmarks= map(x-> log10(x)=x, X)]

@Markiyan Hirnyk It may be manual work, but scaling the input and the input range and customizing the tickmarks is the only way that works. Changing the axes option to mode= log will not change the way that the evaluation points are selected, like the OP says.

I wrote a package to automate this way back in 2001, but, unfortunately it no longer works due to changes in PLOT structures and the plottools:-transform command. It is in the Maple Applications Center as "Improved logarithmic plotting in 2 and 3 dimensions". Even though it no longer works, the code and comments could be perused for ideas.

Note that "Length of output exceeds...." is not an error message. Your answer is still put in the variable sol.

Enter the code with 1D input instead of the (default) 2D input. The variable name `&rsquo` looks like the type generated by 2D input.

The error message is from dsolve, not from LSSolve. You can get around this first error by specifying method= bvp[midrich] in the dsolve. Then you will get an error "initial Newton iteration is niot converging". The usual remedy for this is to specify a continuation parameter. I haven't figured out a good place to place the parameter. See ?dsolve,numeric_bvp,advanced.

@ctnaz You need to download and install DirectSearch from the Maple Applications Center.

@I_Love_LSK It looks like you're using a list of three Vectors. I'm surprised that you don't get an error message. Make the argument to spacecurve a list:

plots:-spacecurve(
     [cos(Pi/3)*sin(t)-sin(Pi/3)*cos(t), sin(Pi/3)*sin(t)+cos(Pi/3)*cos(t), t],
     t = 0 .. 6*Pi
);

And change 60 to Pi/3.

@adel-00 Keep it at infinity. That's just an initializer for keeping track of the minimum. It is changed from infinity as soon as the first value is processed.

@adel-00 Change the Val procedure from Val:= x-> abs(x[2]) to Val:= x-> abs(x[2] - 1e-4);

@Andriy I think that the NAG methods work strictly in hardware floating point, and do not run any differently based on the setting of digits, Digits, or epsilon. Note that they refuse to run at all if digits is greater than 15. I also don't think that there is really any specifically Maple implementation of the NAG method; rather, it is just a call to unmodified external code. If this is true, you should get the same results from any other program that used NAG.

@Majmaj Here are four examples that I hope will improve your understanding. First read through the examples, then go back and read again, this time trying to figure out why each output is the way that it is. After thinking about it for a while, ask me any questions you have if you're still confused.

 

restart:

P:= proc(x) x:= 23; return x end proc:

a:= b:

c:= P(a);

b

a;

23

b;

23

eval(a,1); #One level of evaluation.

b

eval(a,2); #Two levels of evaluation.

23

eval(c,1);

b

eval(c,2);

23

restart:

P:= proc(x) x:= 23; return x end proc:

a:= b:

c:= P('a');

a

a;

23

b;

b

eval(a,1);

23

eval(c,1);

a

eval(c,2);

23

restart:

P:= proc(x) x:= 23; return eval(x) end proc:

a:= b:

c:= P(a);

23

a;

23

b;

23

eval(c,1);

23

#See that c has no connection to a or b in this case!

restart:

P:= proc(x) x:= 23; return eval(x) end proc:

a:= b:

c:= P('a');

23

a;

23

b;

b

eval(a,1);

23

#See that a has lost its connection to b in this case.

eval(c,1);

23

#Nor is c connected to b.

 

Download eval.mw

@ecterrab But can D handle a negative exponent, as is (D@@(-2))? I believe that is what the OP is asking about.

@adel-00 Sorry, it took me a long time to figure out what you are talking about. To extract the beta, for example the 4994., do

Min(mytab2, Val)[1];

Regarding your other question, I still can't figure out what you are talking about.

The error message is about not being able to achieve a certain accuracy. It is not at all surprising to me that rewriting the integrand makes it work. I don't think it's a bug.

@adel-00 Okay, here is a procedure to find the closest point to N'(t) = 0 in mytab2.

Min:= proc(L::{list, set, rtable}, Val)
local x, min:= infinity, v, X;
     for x in L do
          v:= Val(x);
          if v < min then  min:= v;  X:= x  end if
     end do;
     X
end proc:

Val:= x-> abs(x[2]):

Min(mytab2, Val);
       [4994.00000000000, -2.784601937964963e-11]

First 576 577 578 579 580 581 582 Last Page 578 of 709