Carl Love

Carl Love

28100 Reputation

25 Badges

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

MaplePrimes Activity


These are replies submitted by Carl Love

How much data do you have (in Excel)? Do you need to perform this fit repeatedly, so that the process should be automated? Datasets of upto several hundred points can be easily cut-and-pasted directly from Excel into a Maple worksheet. So, if you only need to do this a few times, that might be the way to go for the data transfer.

@Preben Alsholm I have a hunch that this is a GUI error. The two things that lead me to think that are that the error comes from Typeset:-Tdisplay and that you (Preben) did not get the error.

@sidra I just assumed that you wanted to select the entry with maximal absolute value, not the literal maximal entry. What purpose is there in selecting the literal maximal entry? What if the maximal entry is 0? What if you have complex values?

If you really don't want the absolute value, it just requires a trivial change:

MaxWithIndex:= proc(M::Matrix(numeric), col::posint)
# Returns the entry with maximal value in column col
# and its row index.
local
     Max:= -infinity, i, MaxI, v,
     Rows:= proc(M) option inline; op([1,1],M) end proc
;
     for i to Rows(M) do
          v:= M[i,col];
          if v > Max then
               Max:= v;
               MaxI:= i
         end if
     end do;
     (Max, MaxI)
end proc:

Pivot:= proc(M::Matrix(numeric), row::posint, col::posint)
uses RO= LinearAlgebra:-RowOperation;
local Max, MaxI;
     (Max,MaxI):= MaxWithIndex(M, col);
     RO(RO(M, [row,MaxI], _rest), row, 1/Max, _rest)
end proc:

If you want tutorial guidance, I need to know where you're starting from. Do you have any experience with another computer language? Do you have any book to work from?

How is the integral that you wrote different from int(x*ln(x), x)?

@morrisonkathy Two million is not a lot. I can call it that many times in under 8 seconds.

@morrisonkathy 

I was only able to make it a little bit faster, as this:

`&<`:= proc(x,y)
local i::posint;
     for i to 8 while x[i] = y[i] do end do;
     i > 8 or not (i::even xor x[i] > y[i])
end proc;

I can't make this any faster with the usual tricks of compiling or evalhf.

You wrote:

@Carl Love would you like to visit this link http://www.mapleprimes.com/questions/204724-How-Do-I-Plot-Multiple-Ode-Numerical ? thank you :)

Tom Leslie already Answered your Question. What do you want me to do?

And please don't point out current MaplePrimes threads to me. I read them all anyway.

@maple fan There is no universal method to judge the accuracy. But you should try different methods. If you get different results, then some results are wrong, obviously. There are 29 methods available for IVP systems, 4 for BVP systems (the BVP methods can be used for IVPs by using a range specification), and 4 for DAE IVPs. The help page ?dsolve,numeric,taylorseries claims that method= taylorseries[series] is a high accuracy but relatively slow method. To read about the different methods, start at ?dsolve,numeric in the first paragraph of Description.

@Markiyan Hirnyk 

You can also get correct results with method= rosenbrock, which does not have the crude, segmented look of classical[foreuler].

@acer I've done this before (in Maple, rather than Maple TA): I distribute a worksheet to the class from a website. The top of the worksheet is something like

restart:

Change the -1 in the next command to your student ID number.

randomize(-1):

The -1 will generate an error, so that forces them to enter something. I've already executed the worksheet using my ID number, so there's actual realistic output, and then I changed my number to the -1 before saving it and posting it to the website.

Now every time a student re-executes the worksheet, they will get the same problems as before; but the students will get different problems from each other, which cuts down on collusion. If I execute a student's worksheet and I get different problems than the ones that they solved, I know something fishy is going on.

@Markiyan Hirnyk 

That's classical[foreuler], not classical[forever]. It looks like a spell-checker automatic correction.

@sipa I don't see any new thread about this.

@tomleslie You should use the third argument to coeffs, which provides the correspondence between the returned coefficients and the monomials (see ?coeffs). So, the OP's request can be written using coeffs like this:

RepeatPositiveTerms:= proc(P)
local C,T,k;
     C:= [coeffs(P, indets(P), 'T')];
     [seq(`if`(C[k]>0, [T][k] $ C[k], NULL), k= 1..nops(C))]
end proc:

I am somewhat taken aback by Roman's comment. I don't see how lcoeff can be used in this situation, nor do I understand why he does not recommend the three-argument coeffs.

@FaridSW What's a Laurent polynomial? Is that the result of truncating a Laurent series? So, like a regular polynomial, but with negative powers allowed?

@Al86 Maple has functions JacobiTheta1 through JacobiTheta4. All are two-argument functions with the second argument (called the "nome") restricted to magnitude less than 1. Maple has no JacobiTheta0. Would you please read the help page ?JacobiTheta1 and recast your problem in terms of those functions, if possible? If that's not possible, could you give a reference for what you mean by JacobiTheta0 and what you mean by JacobiTheta3 with only one argument?

First 473 474 475 476 477 478 479 Last Page 475 of 709