1285 Reputation

13 Badges

4 years, 286 days

MaplePrimes Activity

These are replies submitted by nm


I think the error you got because you added ";"

for i from 1 to n do  ;

Make sure to copy and paste code shown here as is, without adding anything to it, and then see if that works. It works for me on Maple 2016.2

WHat have you tried? This is not free coding service here where you post your HW and ask someone just to do it for you. You need to show what you tried and where you are stuck.


@Preben Alsholm 

But this is a sturm-Liouville ODE. There are infinite number of eigenvalues, increasing and discrete in values. Numerical solution  showed only one eigenvalue. So a numerical solution will not show the same information as an analytical solution would.  But thanks for sharing this. It useful to know maple numerical solver does this.


"not sure how you are going to deal with this :-( "

Humm,. I never said the data in the file is meant to be Maple expeessions? I simply wanted to use Maple to read the file, so I can make some changes to the data, and then save it back. These are Latex strings. For other purposes, not to be used in Maple. 

@acer Thank you! That is what I was looking for. I simply did not know or hit ImportMatrix when I was searching.


how to put that gray box around the code in your post? I looked at all options and can't seem to see one for source code? Is it in the style or font pull down menu or somewhere else? thanks.


nice! I shortened your code a little bit by make your cylinder a proc()

with(plots):  with(plottools):
sph := sphere([0, 0, 0], 10,   color=gold, transparency=0.4):
cyl:=s->display([seq(cylinder([0,0,0], h, s*sqrt(100-h^2), color=red, strips=50),h=0..10, 0.2)], insequence):
display([sph, cyl(1), cyl(-1)],style=surface,lightmodel=light1,axes=none);


sorry if my question was not clear. I was learning calling maple function, and found these 4 ways, and I was just wondering if there are variations. I mean in terms of using '' and ` ` that is all.


Thank you Bryon. I verified all the data is back online now. I do not what happened either. I remember was making a reply to someone, then mapleprime seems to hang for few seconds too longer than normal, at the point it verifies the name one has to enter before clicking submit. Then I noticed all the data gone there for my account after that point.


Why not post plain text Maple code that one can copy and paste? Do not use 2D, as it is confusing. And what does p(m.theta):=... supposed to mean? Are you trying to make a proc() in Maple?

@Preben Alsholm 

thanks. I saw these, but I had no idea that evalf(('AiryAi')(n,z))  means the same as calling different function in `evalf/AiryAi`

I thought what evalf(('AiryAi')(n,z)) meant, is calling AiryAi() and then converting it result to floating point number.   The call and naming convention in Maple is still strange to me.   Since in user code, when one does evalf(foo(x)), this does not call evalf/foo(x)? It calls evalf() with the result of foo(x). Things must be different in Maple own code for some reason.


Thanks. I think I understand a little more but need to go over all this many more times. First, yes, I mixed the the backqute `  with the single quote '  there. I do not use Maple much and forgot it was the single ' which delays evaluation not `.

I never knew that "if" was a procedure also.  But what is the advantage of writing

`if`(3<4,foo,bar) ;

if 3<4 then

It seems to me this mixture of different styles is not good. One should stick to one way of doing things, so code is consistent. It looks like 2 different languages mixed in one. For example, in the above Maple code I posted, which is from singular() function: showstat(`singular/singular`) :

return `if`(assigned(r),r,{})

Why not write the above as normal code, like this

if assigned(r) then

Yes, the first version is much shorter, but I feel that this mixing of using key word as procedure sometimes and as keyword other times make the code harder to follow, as the pattern keeps changing.


Indexed variable cause problems. So I was trying to see if I can use __. For example.
seq(point( a[i], L[i]), i=1..nops(L));

Error, (in unassign/indexed) arguments of type `indexed' must refer to tables or arrays

So I am trying to avoid using indexed variables, as they work sometimes, and sometimes not.  The cat does work, yes
seq(point( a__||i , L[i]), i=1..nops(L));
also this cat
seq(point( a||i , L[i]), i=1..nops(L));

"and it prints nothing. What is the problem?"


It prints something. It prints

                 0, 0, 0, 0, 1

Maple 2016.1


how do you expect someone to copy source code pasted as image? 

1 2 3 4 5 6 7 Last Page 1 of 17