Dr. David Harrington

758 Reputation

10 Badges

14 years, 265 days
University of Victoria
Professor or university staff
Victoria, British Columbia, Canada

Social Networks and Content at Maplesoft.com

Maple Application Center
I am a professor of chemistry at the University of Victoria, BC, Canada, where my research areas are electrochemistry and surface science. I have been a user of Maple since about 1992.

MaplePrimes Activity

These are replies submitted by dharr

@zia I haven't heard about that method but it sounds like that is outside the scope of a Maple question unless you have started a Maple worksheet you need assistance with.

@acer  Fair enough. It just seemed to me that the effort to work out many terms of the sequence exceeded the work to figure out the (mixed) recurrence, which somehow was a more logical way to approach the problem.

@Ramakrishnan The 621 points is "pixels" in the documentation for DocumentTools,Tabulate - see also DocumentTools,Table. If you make a table that extends over a page, then page break none seems to just kill the rest of the table at the end of the page, allow within cells allows half a cell to be on one page and half on the next, as you see and don't want, and allow between rows (in 2017.3) finishes a row nicely and then starts the next row on the next page, which is probably what you want.

In general , .pdf output, not just with Tables is never quite what you want, and I haven't spent too much time tryng to control it.

@mmcdara  I also played around a bit and got frustrated before I found the help page. I didn't think too closely about the example other than the fact that you have to prevent full evaluation in both Explore and odeplot, and still be able to change the parameter in the solver. 

@Zeineb In Maple 2017.3 I also don't get an answer. But if I use:

bc[4] := f(L, y) = 0;

Then I get the same answer as @ecterrab but with L instead of _c5(n).

@HaHu  My only other suggestion would be to start from a much simpler model for which you can get a solution, and then gradually add complexity. 

@HaHu If you look at the des you have a tough problem - there are coefficients around 1e-6 along with others much larger. The solver works best with things of the order of 1 so you may want to scale the problem. One way to solve this error is to give an approximate solution as a starting value or use continuation. Maybe if you simplify the system setting the small terms to zero and can solve that, then you can look at what the solution looks like and suggest an approximate starting solution.


@HaHu This is hard to diagnose without the worksheet, which you can upload with the big green up-arrow.

@wswain It's a good point. Using op and elementwise operators (the ~ thing) tends to make Maple unreadable for those who don't use it much. So I would use RowDimension rather than its op equivalent. There are also efficient ways to do things (like map) that avoid using loops. But you can write more "fortranlike" code with loops. You could for example fill a matrix with nested do loops. There is perhaps a tendency on Mapleprimes to suggest short and clever but less readable answers.

(And to answer your question on dynamic Arrays/Vectors/Matrices, you can dynamically extend these by using programmer indices - see ?Indexing Arrays)

@wswain  This might answer some of your questions about @tomleslie 's response.



A:=Matrix([[1,2],[3,4],[5,6]]); #list of lists Matrix construction


Matrix([A[1,..],A[2,..],A[3,..]]); #three rows are just next to each other


Matrix([A[1,..],A[2,..],A[3,..]],scan=columns); #list Matrix construction - rows below


op(1,A); # same thing

3, 2

3, 2

op([1,1],A); # same thing - first op of op(1,A);




n := 2



Matrix(%id = 18446744944805405870)

`if`(n=2,A[2,..],NULL); # nothing so no output

n := 26


Matrix(%id = 18446744944805407670)

f:=x->x^2; #squaring function (procedure)

proc (x) options operator, arrow; x^2 end proc



map(f,A); #apply to every entry
f~(A);    #same thing


Matrix(%id = 18446744944805403574)



Download MatrixNotes.mw

@Carl Love Thanks. I was just being cautious. My information is probably out of date, but I had a recollection that in older versions there were some minor differences, perhaps in the maximum setting of Digits. But I don't see any differences mentioned on the website.

@Melvin Brown Looks like you split it into real and imaginary parts. Probably a good idea for a numerical solution, but for an analytical solution, a single complex  equation will probably work better. I'm guessing with this time dependence it's separable into a function of time multiplied by a function of (x,y). I would also probably look for a general solution first - if you can find that then add the BCs/ICs later.

Good luck.

My reading of your problem is that you don't have a way of entering inactive 2-D math, only changing active to inactive by shift-F5. In Maple 2017 (I don't have 2019), entering inactive 2-D math can be done directly with shift-F5, though perhaps you know this already ( @acer 's q1.)


@acer Thanks - homedir is the same on Maple and Maple Player (as expected), so I can work relative to there as a workaround.

I usually put my worksheet in the directory with the data files I want to analyze, then open files relative to worksheetdir, which for this case is the same as currentdir. This means the worksheet doesn't need to be modified if I send it to to someone else who operates the same way. In an interactive application I can use a combo box to list the files in worksheetdir and the user can choose one, not having to change or choose a directory.

@ALIKHADEMI to make variable "a" a Vector, use a:=Vector([seq(1..10,0.5)]);

The rest of the code is the same. I don't understand the rest of your question. To better understand elementwise operators, take a look at the help page for elementwise.

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