tomleslie

13876 Reputation

20 Badges

15 years, 175 days

MaplePrimes Activity


These are replies submitted by tomleslie

I/wikipedia said

Every homogeneous system has at least one solution, known as the zero solution (or trivial solution), which is obtained by assigning the value of zero to each of the variables. If the system has a non-singular matrix (det(A) ≠ 0) then it is also the only solution.

And you say "its determinant will not be zero". Well since the determinat is non-zero, I suggest you read the above Wikipedai statement very carefully - because it means that the trivial solution will be the only solution

From Wikipedia

Every homogeneous system has at least one solution, known as the zero solution (or trivial solution), which is obtained by assigning the value of zero to each of the variables. If the system has a non-singular matrix (det(A) ≠ 0) then it is also the only solution.

Use Determinant(A), immediately after your (A,b):=GenerateMatrix() command. This determinant is non-zero, so the trivial solution is the only solution

Of course it may be possible to select parameter values, so that the determinat is zero, but Maple isn't going to assume this.

Contrast your problem with the "toy" example below which has determinant=0

eq1:=x+2*y-z=0;
eq2:=3*x-3*y+2*z=0;
eq3:=-x-11*y+6*z=0;
(A,b):=LinearAlgebra:-GenerateMatrix([eq1,eq2,eq3],[x,y,z]);
LinearAlgebra:-Determinant(A);
LinearAlgebra:-LinearSolve(A,b, free=p);

Somewhat confusingly, the dsolve/numeric/bvp help page never mentions "finite difference". Try using the Find/Replace function on this page.

On the other hand the dsolve/numeric help page contains the paragraph (my emphasis)

The default for initial value problems (IVP) is a Runge-Kutta Fehlberg method that produces a fifth order accurate solution (For more information, see rkf45 or numeric,IVP). For boundary value problems (BVP), a finite difference technique with Richardson extrapolation is used (For more information, see numeric,BVP). For differential-algebraic IVP problems (DAE), a modification of the rkf45 method is used (For more information, see dae_extension).

I fixed a couple of minor typos, none of which had a significant effect on the eventual solution.

I plottedthe solution of the BVP, ie f(eta) and theta(eta) from 0..inf - just to make sure everything was being evaluated OK

Resutant worksheet is attached pdeProb.mw

I don't see any problem with this worksheet

I have no idea how this problem relates to your original post - maybe if I knew what "DTM" meant that would help. But checking various acronym finders doesn't give me any enlightenment.

Is it possible to write a recursive function which never terminates - YES (but can be fixed)

Is it possible to debug code which OP cannot be bothered to load - NO

Like I said earlier, I'm not a big user of workbooks- mainly because I don't see a significant advantage over my existing methods of organising "a project" containing say a Maple worksheet ( .mw file ), some required procedures (in .mpl files) and necessary data (which could be in plaintext, .csv, Excel whatever)

I think you need to take a reality check.

When you make the statement

Why do I have to write these commands, just because I am placing those files inside the Workbook?

You need to consider the possibilities which have to be catered for - as in

  1. You have multiple data sets within the same Excel file, possibly organised as different worksheets, or possibly on the same Excel worksheet , just different cell addresses. Now think how exactly your Maple worksheet is expected to "know" which of these multiple data sets you want to process.
  2. Or possibly you could have multiple data sets in entirely different Excel files and each of these Excel files is contained in your Maple workbook. So which get of these multiple data sets gets processed?

So the bad news is that you will always have to somehow specify which dataSet(s) get processed!!

You make the further comment

it will be possible to access the files inside the Workbook via the menus, just as it was without the Workbook!

In which version of Maple was it possible to load data "via the menus" because you can't do it in any of Maple 18, Maple 2015 or Maple 2016 - some sort of "import" command has always necessary, and the nature of the "import" command depended on the data format - text, csv, tsv, Excel, whatever.

You never have been able to access "files inside the Workbook via the menus, just as it was without the Workbook!" so this comment is specious

Haven't used workbooks much (cos they're new).

However in order to get your workbook to function at all, I had to use a URI and an ExcelTools:-Import() command, so that the code in the workbook now reads

restart;

with(Statistics):

dataURI := "this://data.xlsx"
M:=ExcelTools:-Import(dataURI, "Ark1", "A3:B63");

f := unapply(ExponentialFit(M, x), x);
plot1 := plot(f(x), x = 0 .. 700, y = 0 .. 1200);
plot2 := ScatterPlot(M, symbolsize = 20);
plots[display](plot1, plot2, labels = ["x", "y"]);

The file "data.xlsx" is actually stored within the "Workbook_example.maple" file itself. So changing some external Excel file is not going to be reflected within the workbook. Think of the "Workbook_example.maple" file as a "container", in which you have the worksheet itself "Exponential fit.mw", the image file "image.png" and the data file, "data.xlsx"

@Preben Alsholm 

A thing of beauty!

Obviously I can't speak for Macs, but I feel like I've been using ctrl+shift+enter on Windows since the year dot.

It definitely works on Maple 18/Maple 2015/Maple 2016. Unfortunately OP is using Maple 17, which I no longer have installed, so I can't check that one - but the Maple 18 help does not indicate that this is a "new" command sequence - so I have to guess/assume that it was in Maple 17 as well???

I am having a problem with the statement

The data from the Excel file was still present. The bad thing: If I changed some data in the Excel file inside the Workbook, it didn't register in the Maple file when updating it

Now you can "change some data in the Excel file inside the Workbook" but this won't change the data in the original file unless you explicitly overwrite (which you can do if you want to - but seems risky to me)

The phrase " it didn't register in the Maple file when updating it" is meaningless - too much use of 'it' without specifying what 'it'' refers to

 

Consider the attached 'toy' example

toyExample.mw

Load/execute this worksheet.

Then use Edit->Find/Replace from the menus, with 'a__1'  as the Find/String entry, then successive 'clicks' on the 'Find Next' in the popup will find the relevant occurrence in the first input group and also the first output group. Subsequent clicks on the 'Find Next' will not find the occurrence in the second input group, or cycle back to the first occurrence!! Seems like the Find/Replace got 'stuck' or just plain stopped functioning.

Contrast this with using Edit->Find/Replace from the menus, with 'a1' as the Find/String entry. Then successive 'clicks' the 'Find Next' in the popup will find the relevant occurrence in the third input group, the third output group, the fourth input group and cycle back to the third input group, and so on ad infinitum

My only conclusion from this is that if the findString contains '__' then something 'breaks' after such an occurrence is found in an output group - and I have no idea why!

I checked the above behaviour in Maple 2016 (but no other versions) running on 64-bit win7

I've just seen Carl's response and he did way better than I have.

We agree on problems with Ln/ln, Pi/pi, and S/s although I haven't (yet!) worked out why his plots came out faster/more_Interesting than mine

(and apologies if I am stating the obvious)

As stated earlier I can't check Maple 17 cos the earliest version I currently have loaded is Maple 18. I can't find anything in the Maple 18 help which suggests that ctrl+shift+enter is a "new" way to execute the entire worksheet, so I'm (mildly) surprised that this sequence doesn't work in Maple 17.

Attached is a screen grab of the relevant menu entries in Maple 18

The crt+shift+enter sequence is displayed next to the edit->execute->worksheet entry

Is there really no similar entry in the equivalent Maple 17 menu system?

Earliest Maple version I have is Maple 18 and it has ctrl+shift+enter on the menu entry Edit->Execute->Worksheet.

What is corresponding entry on Maple 17?

I agree that entering an "invalid" keyboard sequence should do nothing, but

  1. I imagine that "parsing/trapping" all of these would be pretty difficult
  2. It wouldn't surprise me if there were quite a lot of "undocumented" sequences, which application authors could use, maybe  for assorted debug purposes. There might even be some kind of "lock-the-application" sequence - and if you don't know the corresponding "unlock-the-application" :-(

The "normal" keyboard shortcut for executing the complete worksheet is ctrl+shift+enter - see the entry in the manual (or indeed the Edit->Execute->Worksheet menu path)

Uing 'Alt' with a sequence of letters is just a method of working through Maple's menu system to arrive at the same command, because

Alt+e refers to the Edit menu

Alt+e+e refers to the Edit->Execute submenu

Alt+e+e+w refers to the Edit->Execute->Worksheet command, in this submenu

The same process to work through a menu system works with most(?) other Windows applications (Macs presumably do somethig similar-ish). It is however a sort of "historic tradition", not a "standard"

Usually the letter sequence refers to the first letter of the (sub-)menu/command. Another "tradition" says that if there are two entries in the same menu which start with the same letter, then one of them will be obtained by using its initial letter, and the other by using its second letter (assuming no other entries start with that letter), and so on

So your problem sequence, Alt+e+w+w, *ought* to access the 'w' command in the 'w' sub-menu, of the Edit menu. When I try this nothing happens, presumably because there is no corresponding 'w' sub-menu in the Edit menu, so the letter sequence is invalid.

I have no idea why this would would cause a "freeze", and hasn't for me on a few tries.

First 142 143 144 145 146 147 148 Last Page 144 of 207