dharr

Dr. David Harrington

7720 Reputation

22 Badges

20 years, 239 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 retired professor of chemistry at the University of Victoria, BC, Canada. My research areas are electrochemistry and surface science. I have been a user of Maple since about 1990.

MaplePrimes Activity


These are replies submitted by dharr

@acer Thanks, that's helpful.

@acer I often put a number here as an initial value (especially 1), so my expectation was the same as the OP's. type(undefined,algebraic) and type(1,algebraic) both return true. On the other hand other symbols act like undefined...

@acer I stand corrected. I checked in the 2015 help, and assumed it wouldn't return in later versions. My new 2022 version will arrive soon...

@PaulNewton fi is a short form for end if. In older Maple these backward spellings were standard - also od for end do. Now they are no longer documented, but can still be used.

(The FAIL is the result of the else clause, that is returned if there is no match.)

@Carl Love The OP pointed out that when using save there are linebreaks that make it unreadable by matlab.

@PaulNewton You can also use the "Insert code snippet" icon (the one with <> in a box).

Not sure if this is your problem since you didn't upload a worksheet/document. However, you should not use with(plots)within a procedure. Instead put uses plots; at the beginning of the procedure.

foo:=proc(expr)
  local A;
  uses plots;
  A:=plot(expr);
  display(A)
end proc;

foo(x^2);
foo(x^3);

 

(Not sure what A:=Array(1) is doing.)

@astroverted Here the 3D plots as well

DQ4.mw

@astroverted Nice work on the faster method. Use display to combine plots of all kinds.

DQ4.mw

For a 3D plot, I think you will have to use the output=Array option of dsolve, and then use matrixplot or surfdata. I'll try that later when I have a little more time.

The help page for type/float suggests there is support only for double precision. In that case you can do things like in the attached.

Download float.mw

Edit: see my other response for a solution.

@AHSAN Your solution has no variable y. Do you mean x? For phase plots like you show using the commands @tomleslie mentioned, you would need to supply the DE and the initial condions you are interested in.

@mmcdara Sorry if I misunderstood what you meant. I was initially confused about what the OP wanted. My understanding of epsilon is that the contour integration has to be along the real axis but has to include the pole at the origin (the only pole along the real axis in this case). I would write this with integration limits x=-infinity+I*epsilon..+infinity+I*epsilon and leave the epsilon out of the integrand, with the assumption that you need to take the limit as epsilon tends to zero from above. 

Doing it by residues bypasses the details of the contour other than making sure the poles along the real axis are included. I think to do it the hard way would mean having a small semicircle around the poles (into the upper half plane) and taking the limit as their radii went to zero. 

Having said that, I'm still not clear that this is the right definition of the FT, but there seem to be many variations.

Edit: Now I thnk about it, maybe the contour is for the upper half plane excluding the poles along the real axis. That solves the sign problem.

@mmcdara The OP doesn't actually want the Fourier transform of FTI, rather FTI is the definition of the Fourier transform of 1/sinh(x)^2.

@mmcdara I liked your hand solution and voted it up. But since @yangtheary never seems to respond, I agree that it may not be worthwhile.

First 44 45 46 47 48 49 50 Last Page 46 of 78