nm

11353 Reputation

20 Badges

13 years, 12 days

MaplePrimes Activity


These are questions asked by nm

Using Maple 18.01 on windows 7.

When setting typesetting level to extended, I get this (which is what I want):

restart;
diff(x(t),t);

But I also wanted to use alias, to make the above show just as \dot(x), i.e. without the (t) as well, since the equations are long, and not having (t) printed next to each letter would make them easier to read. But I found out that if I use an alias as follows

alias(x=x(t))

then now the typesetting level extended no longer works:

restart;
alias(x=x(t));
diff(x,t);

What do I need to make Maple display  only \dot(x) without the argument (t) everywhere?

 

 

 

 

I wanted to answer a question and show an animation contained in an animated gif file. The file is small gif file and is on my local drive on my PC.

I am not able to find a way to include it here as I can easily do on stackexchange so it plays on the screen when someone sees the post.

Does this forum support such a feature? I tried the image->include, and in the URL I typed  C:\foo.gif, but nothing showed up on the post. So it did not work that way.

I was browsing this Maple book, and read this below.  This contradicts everything I expected about direct assignment to an element of a list, which I view as an array and should have O(1) cost to modify any one element in it.

So, clearly there is something I don't understand about Maple here or I am not reading this correctly.  Here is the bit from the book I scanned. This is from Computing with Maple, by Wright, page 61, ISBN 1584882360

 

So is one really supposed to write  

subsop(index=value,L) 

instead of the more normal and natural

L[index]=value

For making changes to list L?

I also do not understand the book when it says "only allowed on small lists anyway". Allowed by whom? Will one get an error if they assign to an index on large List?

I am confused by all of this, and that is why I am asking for clarification.

 

I am finding it a struggle to do this trivial task in Maple.

Given a matrix, I simply wanted to find the positions (index i,j) of all elements that meets some condition. For example, given matrix A:=[[1,2,3,],[4,5,-1]]; I want to find the index of all elements >=3, so the result should be a list of set such as

         [[1,3],[2,1],[2,2]] 

I tried to use member with 'pos' option but that does not work for matirx. It seems only designed for 1D

A:=Matrix( [ [1,2,3],[4,5,-1]] );
c:=select[flatten](x->x>=3,A);  #tried without flatten also
member(c,A,'pos');
pos;

Then I tried rtable_scanblock(), which is the most convoluted and badly documented command I have ever seen in my life (for such a complex command, one will expect 100 examples of many sorts of functionality to illustrate how to use, but only 3-4 trivial examples exist and 3 of them pretty much the same).  What is operation_passindex? what is operation_passnoindex? how to use them? Why is there a star next to val* and operation* ? What is passindex actually? is it a name? value? proc?  etc.. Worst help page ever. 11 parameters for a command??

This is what I tried:

A:=Matrix( [ [1,2,3],[4,5,-1]] ):
rtable_scanblock(A,[],(val,ind,res)->( evalb(val>=3),[ind,val],res),[[1,1],A[1,1]]);

So the result I want is there. I just do not understand why the true,false and those last entries are there and how to get rid of them. I tried. I think I need one other options, but I am lost with all the options listed there with no examples on how to use them.

rtable_scanblock(A,[],(val,ind,res)->`if`( val>=3,[ind,val],res),[[1,1],A[1,1]]);

but then I get only the last value:

I tried

rtable_scanblock(A,[],(val,ind,res)->`if`( evalb(val>=3),[ind,val],res),[[1,1],A[1,1]]);

no difference.  I think I am close, but after 30 minutes, I am calling it quit. If something so easy takes that much effort to find how to in Maple, then something is wrong.

In Matlab, I do this with my eyes closed:

A=[1,2,3;4,5,-1];
[I,J]=find(A>=3)

I =
     2
     2
     1
J =
     1
     2
     3

In Mathematica, such as trivial

mat = {{1, 2, 3}, {4, 5, -1}};
Position[mat, x_ /; x >= 3]

                 {{1, 3}, {2, 1}, {2, 2}}

Thank you

 

In Maple, I seem to keep finding commands in different Maple build-in packages that does the same thing. Which is very confusing for someone trying to learn Maple.

Maple seems to have good things in it, but at the same time, it strikes me as a large bag with lots of tools and commands thrown in with little sense of coherence. One needs one command from one package to finish the job started using a command from a different package, and an option from one place to patch something done with a command from another package.

Here is one example. I wanted to obtain the diagonal of a matrix. So far, I found 3 commands that do the same exact thing:

A:=Matrix([ [1,2,3],[4,5,6],[7,8,9]]);
MTM:-diag(A);  #1
LinearAlgebra:-Diagonal(A);  #2
Student:-LinearAlgebra:-Diagonal(A);  #3

I am sure if continue to look, I might find another command to do the same thing hiding in some other package.

The problem for new user like me, is how does one decide which comand to use. This is the same as with constructing a Matrix. There is the Matrix([[]]) notation and metod, and there is the <<>> notation that does the same thing but with different and conflicting syntax.

Having many commands that do duplicate things is not a good thing at all. Commands should be axiomatic and orthogonal to each others. I think there should be a document that describes from a high level all these packages, may be as a block diagram with arrows that show the relation, if any, between them, and how they interact and when to use one vs. the other.

Is there a reason for this duplication of functionality? Does any one at Maplesoft look at such issues?

 

First 185 186 187 188 189 190 191 Last Page 187 of 199