itsme

569 Reputation

13 Badges

12 years, 181 days

MaplePrimes Activity


These are answers submitted by itsme

thanks for the answer

Another option you have is to use an external editor (say vim or emacs) that may be easily controlled with a keayboard. To do this, save your commands in a simple text file - say fileName.mpl - and then from the command line run it with:

maple fileName.pl


You could also have the commands of the file fileName.mpl executed inside the maple GUI. To do this open up maple and run:

read "/path/to/file/fileName.mpl";


This is far from ideal, but it may be a superior method to edit large chunks of maple code, assuming you can control your editor with the keyboard.

I should also note that you can use keys tab and shift+tab to jump to the next/prevoius execution block (although shift+tab is still broken on linux in a worksheet mode).


Edit: Configuring keyboards bindings is not possible right now - but I agree, it would be great if maplesoft would implement that.

yes, exactly - in my work I often have a case where a I deal with a tensor product of (say) two hilbert spaces - one very small, the other large or infinite. So it would be nice to be able to represent the small one using the matrix formalism (i.e. with LinearAlgebra) and keep the operators on the other in the operator-form, and yet have the simplifications/etc work correctly.

Do you have an idea when we can expect an update to be publically released?

thanks

>According to that, the output for diff(Dagger(P(t)), t) would be 'unevaluated' (that is, as you are entering it, without performing any operation). That is what I have in the version of Maple under development after the bug got fixed. Opinions?

yes - that is what I would expect.

mytable:=table([B=4,C=2,A=3]);

sortedIndices:=sort([indices(mytable, 'nolist')]);

 


now to get the ith (say for i=2) entry from the table you can do

i:=2;

mytable[sortedIndices[i]];

 

 

I don't think you can do that (unless you extract the data for a given realization and say interpolate the points "in-between"). You can however pass in a "timegrid" (http://www.maplesoft.com/support/help/Maple/view.aspx?path=Finance%2fTimeGrid) which may be non-uniform. This might be helpful if you know what points you want to look at.

I installed the 32bit version. Right now it does nothing when I pass it the -cw flag, but I'll sort out later why.

In any case, even if the bindings would work with the classic version of the interface, I'd still be losing out on the performance superiority of the 64 bit version , which from what I saw can be significent in some tasks.

It would be great if the ability to change key bidnigns would be implenented in the future versions of maple.

thanks for your help.

 

I am also curious about this. I use tables all the time, as I find them useful for grouping variables together, but I do not know what the internal implementation is like. Someone from Maple who knows the internal implementation would be best to answer this.

Although, perhaps a way to gain some insight might be be to create a (VERY) large table and see how the access time scales as the size increases.

1) Maple has a "Physics" package which you might find useful (see http://www.maplesoft.com/support/help/Maple/view.aspx?path=Physics/* ). You can check the help-page to see what can be done with it and it may do what you need, but I have had some issues when dealing with operators acting on different Hilbert spaces (you can search mapleprimes for details). To a large extent QM is just linear algebra with complex numbers (ha!), so you can also do A LOT with the LinearAlgebra package.
2) The answer will depend on what it is you want to do. Personally, I use Maple daily, and I work in QM.  

I cannot answer your questions 3-5, because I've only had a very limited experience with Mathcad.

I might add, that one feature which is very useful for physics in general (but unfortunately rather limited in Maple) is the "Explore" command, which lets you dynamically vary multiple parameters of a plot (or a solution). Its equivalent (but much more versatile) command in Mathematica (called Manipulate), is the main reason, why many people I know use Mathematica instead of Maple. I really hope Maplesoft updates "Explore" at one stage... but perhaps that's another story for another post.

 

I agree that what you describe (and in particular the way you describe it, where it could be easily changed in real time) would be useful for the gui mode.

It is sort of possible right now if you work in the termial (and call your code with "maple <filename.mpl>"). You can use the macro $ifdef to mark off code you do not want executed, and simly comment out the macros if you do want the code to run - this can be made simple with a good editor. Something like this.

$ifdef notdefined
a:=1 #this will not be executed if never defined 'notdefined'

$endif

Yes it is possible as Alejandro suggests above.

Note however, that there are some problems when trying to control what the plots look like. For example there is a bug with the fonts when exporting to jpeg or gif. See for example:

http://www.mapleprimes.com/questions/124192-Exporting-Plots-To-Files

Thanks for your answers.

My ultimate goal is to produce publication-quality plots, ideally in the eps format.

I enlarge the gifs (by setting the size in savePlotGIF function) because I find that after conversion to eps, when latex shrinks them, the quality is better than it would be without increasing the original size. As I menioned the exporting with variable font does seem to work when ran from the GUI interface, but my other point is that I would like to obtain the same results from the terminal (I have access to powerful remote, headless machiens and running the gui on every run complicates things). 

Axel: I would like to "save" plots programatically, and not really "export" the worksheet by hand.

Acer: I will take a look at your method, it does seem nice! Could you verify that you get the same behavior in the resulting figures when the worksheets are executed from the terminal?

so to fully answer my own question (hah!) in case someone else needs this... i think this does what i want:

restart:
with(Physics):
quantumOperators:={ap,am, sx, sy, sz}:
Setup(quantumoperators=quantumOperators):
Setup(Commutator(ap,sx)=0, Commutator(ap,sy)=0, Commutator(ap,sz)=0, Commutator(am,sx)=0, Commutator(am,sy)=0, Commutator(am,sz)=0):

now am, ap do not commute with eachother (likewise sx,sy,sz), but a and s "type" operators do commute.


i would still be interested to know how other people deal with this in maple.

 

in the spirit of partly answering my own question...  it looks like the physics package may do this:

 

with(Physics):
Setup(noncommutativeprefix={a,x}):

expand((a1+a2)^2);
a1^2 + a1 a2 + a2 a1 + a2^2


expand((x1+x2)^2);
x1^2 + x1 x2 + x2 x1 + x2^2

... so that works.. but now:

expand((a1+x2)^2);

a1^2 + a1 x2 + x2 a1 x2^2

... now i just need to tell maple that operators that start with x DO commute with operators which start with a.


if i do

Setup(noncommutativeprefix=a, noncommutativeprefix=x):

then the non-commutative properties of a get overwritten.

thanks to all for suggestions.


In my case the matrices usually do have a full set of linearly independent eigenvectors, and hence I have been simply diagonalizing before exponentiating (just as Robert suggested - although his code snippet manages to look much cleaner that mine!)...  


I am still curious however if Mathematica manages to do something clever(er) inside their equivalent function...
 

1 2 3 4 Page 3 of 4