tomleslie

13876 Reputation

20 Badges

15 years, 180 days

MaplePrimes Activity


These are replies submitted by tomleslie

on my machine is Maple 18, for which the following will work


 

restart;
A:=1:E:=0.1:m0g:=0.05:
L0:= <  5,    5,    5,    5 >:
u:=  <-5/4, -1/4, -3/4, -1/4>:
v:=  <-1/2, -3/2,  1/2,  1/2>:
w:=  <  0,    1,    0,   -1 >:
Force:=Matrix(op(1,L0),2):

for i from 1 to op(1,L0) do
    r1:=H*L0[i]/(A*E)+H/m0g*(arcsinh(V_A/H)+arcsinh((m0g*L0[i]-V_A)/H))-sqrt(u[i]^2+v[i]^2);
    r2:=V_A*L0[i]/(A*E)*(m0g*L0[i]/(2*V_A)-1)+H/m0g*(sqrt(1+((m0g*L0[i]-V_A)/H)^2)-sqrt(1+(V_A/H)^2))-abs(w[i]);
    Force[i,..]:=convert( [map( rhs, fsolve({r1, r2}, {H,V_A}, H=0..1))[]], Array);
end do:
Force;

Matrix(4, 2, {(1, 1) = 0.6966828132e-2, (1, 2) = .1250000000, (2, 1) = 0.8136998100e-2, (2, 2) = .1138783665, (3, 1) = 0.4227856938e-2, (3, 2) = .1250000000, (4, 1) = 0.2366187129e-2, (4, 2) = .1138879973})

(1)

 

 


eqSolve2.mw

If this still doesn't work in Maple 16 - get back to me. I will try to resurrect a Maple 16 version from somewhere fot further checking

Download eqSolve2.mw

march is not referring to machine architecture - it's maple archive - see the ?march help page for more info

a:=1;
b:=0;
a/b;

Now this (obviously) fails with an Error message. In your case of being blind and deaf, how would you *know* that it has failed??? I just don't get it!

Absolutely any command you execute can fail with an error message - and if you are blind and deaf, then you will never know.

In this respect there is nothing special about fopen(). Like any Maple command, it either succeeds or it doesn't, just like the '/' in my 'toy' example above. Do you want a method of verifying the success/failure of every Maple command, which will be intelligible for those who are blind/deaf??

The DirectSearch package is available at

https://www.maplesoft.com/applications/view.aspx?SID=101333

It shoulh be unzipped to the 'lib' directory of your Maple installation. For Maple 2017 on a 64-bit Win7 machine, this will be at

C:\Program Files\Maple 2017\lib

 

 

You seem to want several differetn linear combinations of several different dsolve() commands. The linear combinations being determined by the matrix 'Psi' This seems a slightly odd thing to calculate, so maybe I am misunderstanding.

The attached performs the calculation I think you want!

ODEplot2.mw

see the final execution group in the attached for how to extract numeric values

fixed1.mw

You need

  F:= t-> piecewise( t < 0, 0,
                                 t < 1, 100,
                                 t < 2, 200,
                                 t < 3, 50
                              );
  sol:= dsolve( [ diff(y(t),t$2)+4*diff(y(t),t)-3*y(t)=F(t),
                           y(0)=0,
                          D(y)(0)=1
                        ]
                      );
  plot(rhs(sol), t=0..5);

 

When using 1-D math input don't use a semicolon (or colon, or anything) to terminate the line

make_PSI := proc(nplanets);

If you add this offending semicolon to the same point in your 2-D input, then this will also fail

because it deends what you want it to look like in Excel, and there are many possibilities, amongst which are

  1. Each 2D "slice" of the array goes to a different "sheet" in Excel
  2. Each 2D "slice" of the array goes to the same Excel "sheet" but wih a different specified start cell
  3. Within Maple, construct a 2D data structure from your Array: so starting from A[i,j,k], create B[i,j], where the B[i,j] entry comprises the list A[i,j,[1..k]]

There are probably other possibilities - so you are going to have to specify what you want

First of all, let me say that I know nothing about elliptic integrals!

All the examples I read both in the Maple help, and the Wikipedia page https://en.wikipedia.org/wiki/Elliptic_integral#Incomplete_elliptic_integral_of_the_third_kind, use real arguments. I can't find any statement that the arguments have to be real.

Experimenting with your case ie "EllipticPi(n,k) @ a=0.5 and x=0.8 with B=0..1"  I find that both 'n' and 'k' are complex for B<~0.24(roughly) or B>0.65(roughly) - is this deliberate????

Further experimentation with the EllipticPi function shows that it returns complex values whenever n>1, and (even when n is real), for your case it is generally >1. So do you want complex values from EllipticPi(n,k).

See the attached for demonstrations of the above assertions

elliptInt.mw

 

It is more about the different way Maple treats 'sequences' and 'lists'.

If I go back to the line in your original code

 nonIdMaps := [nonIdMaps[],eval(f)]

then consider logically what this does: Essentially it is a a four-step process, which is

  1. convert nonIDMaps from a 'list' to a 'sequence'
  2. add an element to the sequence
  3. convert the resulting sequence back to a list
  4. assign this list it to the original name nonIdMaps

So consider the possibility that you can skip stage (1) and stage (3) above - just by starting with a sequence and adding an element to the sequence - got to be faster......right?

Second reason is that you create a new list at each step, and this new list does not overwrite the old list, it is a completely new entity in memory. So if you do this in a 'for' loop you end end up with mutliple copies of the list which have just grown by a single element. This burns memory, which Maple's garbage collector will *probably* deal with - although such garbage collection will also eat time.

The code I posted ie seq(...) just generates a sequence, so there is no conversion to and from lists and no garbage collection. By using [ seq(..) ], the sequence is generated, and the enclosing '[]' will convert the final sequence to a list.

You mean you want something like

plot3d(EllipticPi(x*sin(y), y/(x^2+y^2)), x=0..1, y=0..1);

or what, exactly????

Since this is a *minor* upgrade I would not expect the installation process to take very long: 20secs sounds fine to me.

You can double checkthe installation  in a variety of ways

  1. Close down all Maple sessions.
  2. Use CTRL-ALT-DEL to launch the Windows task manager. Navigate to the "Processes" tab. Click on the "Image Name". This will organise all running process in alphabetical order, Scroll down these processes looking for anything called mserver.exe. If this exists (and it is possible to have more than one!) then you have some "zombie" Maple sessions. If you do, then right click on each mserver.exe entry and select End Process Tree
  3. You now definitely do not have any Maple sessions running, zombie or otherwise
  4. Fire up a new session of Maple:  From the toolbar, Help->About Maple should show Maple 2017.1, probably with a build ID of 1238644
  5. Double-check by going to C:/Program Files/Maple 2017/. In this directory there ought to be a couple of files called something like Maple_2017_Install_2017_05_26_09_14_24.log and Maple_2017_Install_2017_06_29_09_07_41.log. You should have two files because one will correspond to the installation log for Maple 2017.0 and the otherr for MAple 2017.1. In the name eg Maple_2017_Install_2017_06_29_09_07_41.log, I'm pretty sure that the emboldened section should correspond to the date (American format) when you performed the installation, so I'm guessing that you are going to see 2017_07_04 as the centre section. Double-click this file: it shuld fire up in Notepad (or maybe some other default editor which you use). If it says Installation Completed at the end then you are almost certainly "good-to-go"
  6. Since Maple do not give a detailed list of improvemnts/enhancements for minor releases, it can be difficult to verify what precisely has changed. However, in this instance, they have fixed one of my "pet hates" in Maple (which I have been whingeing about for ~5yrs). The Maple debugger was almost unusable, because on a high resolution screens (certainly 2560x1440 or higher), text in the Maple debug window was too small to be usable, and font size could not be changed. With the Maple 2017.1 release, text size has become reasonable and the Maple debugger has become usable again!!!

 

 

This one works in Maple 18 - apparently the ExcelTools:-Import() command used to return an Array, rather than a Matrix - who knew/remembered. And the 'op' sequence for Arrays and Matrices is different!!

excelImp3.mw

If you are using a Maple version before Maple 18, I probably won't be able to help much further because I don't have any earlier versions of Maple immediately

PS: it might be helpful if you specified the Maple version you are using in any future queries. Many/Most of the respondents here will assume that you will be running the latest version. Some (like me) will have earlier versions available, and will respond  in code which works in the version you specify

Note however tha if you are running a really old version then you may still have version issues. For example, I only have the last four major versions available

The use of the index '-1' to desgnate the" last" element works in Maple2017.1, but not in any previous version (at least for matrices, although I know that is does work in previous versions for other indexable quantities, such as lists, Arrays).

I have amended code in the attached to fix this indexing issue in a way whihc ought to work in all Maple versions

I have also incude some extra exexution groups to produce plots for every third element. Eaqsy to modify this for every fourth, fifth, whatever, element

excelImp2.mw

First 117 118 119 120 121 122 123 Last Page 119 of 207