mmcdara

3815 Reputation

17 Badges

6 years, 117 days

MaplePrimes Activity


These are replies submitted by mmcdara

@Carl Love 

thanks Carl.

I am not sure I have clearly understood all you have said : a lot of things are quite new for me.


Just a last question before I start digesting all this material : 

When I construct a module and I want to archive it, I write in a worksheet a code like the one below (it is probably a pitiful method)


# 1) definition of the module

MyModule := module ()
export F1, F2, ....F10;
option package;
F1 := proc(...)
...

end proc;
F2 := proc(...)

...

end proc;
...
end module;

 


# 2) Archiving

MyArchive := "/.../MyModule.mla";
march(`create`, MyArchive, 10);
savelib(MyModule, MyArchive);


I have no .m file here.
But you write : "A library is stored in an .mla file. A .mla file is constructed from .m files by using march."
Did I missed something ?

@Carl Love ... but  I am a little bit confused by your answer


I use to write modules that I save in  .mla files which I manage with the march command.

Of course I should have read more carefully the march help page and more specifically all which concerns .m files.
But, before your answer I thought naively that the concept of "archive" was related ONLY to mla files and the concept of "library"

Here is my first source of confusion : probably because some background in numerics I associate the idea of library to a collection of numerical routines or procedures (as for the NAG library for instance).
I naively thought that, in Maple, the term "library" had the same meaning  whereas it seems to have a broader sense and that a library may contain other things than just procedures  ... ???
I have to confess here that I am probably confused between the terms archive and library ?

An other source of mistake is my knowledge of Matlab, where .m files generally contain structures data, not code.


If it is not much to ask, could you shed some light on these issues for me ?

Thanks in advance

 

@tomleslie 
Huge thanks to you Tom 


@Carl Love I have just browsed all the questions I have asked to see that I hadn't gave you a reply :-(


With all my apologies here it is :

Quite strangely the set of instructions returns no error at all !!!

I'm not sure what to think of this ? It is likely that I did some mistake when I answered you for the first time.

 

Even if I am probably not the only one to "forget" about answering I'm sorry about that. I'll try to do better the next time.

Have a good day

@vv 

OSX El Capitan

@doduythao 

 

VeHinhNemXien := proc(Alpha,Vbd)
local Y,V0,alpha,X,ball,Xmax,bgr;
uses plottools, plots;
Y := unapply(V0*sin(alpha)*X/(V0*cos(alpha)) - 1/2*9.8*(X/(V0*cos(alpha)))^2,alpha,V0,X);
ball := proc(x,y) plots[pointplot]([[x,y]],color=red,symbol=solidcircle,symbolsize=40) end proc;
Xmax := 2*Vbd^2*sin(Alpha)*cos(Alpha)/9.8;
bgr := plot(Y(Alpha,Vbd,X),X=0..Xmax,linestyle=[2]);
animate(ball,[X,Y(Alpha,Vbd,X)],X=0..Xmax,scaling=constrained,labels=["Độ xa","Độ cao"],frames=60,background=bgr);
exportplot(FileTools:-JoinPath([FileTools:-TemporaryDirectory(), "dothi.gif"]), animate(ball,[X,Y(Alpha,Vbd,X)],X=0..Xmax,scaling=constrained,labels=["Độ xa","Độ cao"],frames=60,background=bgr), gif);
end proc:

VeHinhNemXien(1., 2.)


Here the result (screen capture of the gif file I wasn't capable to load)
 

@John Fredsted 

I guess sand15 wanted to write

S2 := map(u -> [ 2*rhs(u[1])-1, 2*rhs(u[2])+1], [S1]) ;

This seem to work well : 

S3 returns [[1, 3375], [3, 1125], [5, 675], [9, 375], [15, 225], [25, 135], [27, 125], [45, 75]] which seems to mean
the first sequence has only one element centered at 3375 ; the second 3 consecutive odd numbers centered at 1125 and so on.

I am awaiting confirmation

@acer I apologize, I read that the solution provided by Maple was [0, 0, 0] as it is just the verification rhs(..)=lhs(...).

SORRY AGAIN.

That'll teach me a lesson to watch the ITALY-BELGIUM football match and trying to do maths 

End of the day for me, I go to sleep. SORRY again

@acer  

With all due respect, I'm not the author of the question. I may have misled you by clicking on the "reply" button at the bottom of your own answer to candermix (?)
Saying that I'm just a third party in this discussion.

Fot the "2042"  value thr true one is 9*sqrt(2042) ; I have forgotten the 9 somewhere by thoughtlessness.

However, If I consider, as I think you did too in your answer to candermix, that each equation 

eq. := ......, N ;  has to be interpreted as  eq. := ...... =  N ; then your equations are analytical representations of 
spherical surfaces.
My purpose was not to complete squares (to be honnest I did this to obtain the values of the radii), but to draw a solution procedure based on geometrical analogies (so the spheres instead of the equations you sent me).

With the reasoning that I sketched, I found there could not be any (real) solution. This was a very different result than the one you provided. But drawing the three surfaces seems to confirm I'm right.

So the true point is : If I'm right, what is the meaning of this double [0,0,0] solution Maple returns  ?
All the more so that x=0, y=0, z=0 is not, obviously, a solution of any of the 3 equations (easier to verify with the original ones)


I won't take up your time, but I would appreciate an aswer,
Thank you in advance

@acer By simple computations :


eq1 represents a sphere S1 centered at (67, -400, 180) with radius sqrt(2042) 
eq2 represents a sphere S2 centered at (467, -450, 185) with radius sqrt(133027) 
eq3 represents a sphere S3 centered at (307, -675, 555) with radius sqrt(787948) 

the distance between the centers of balls S1 and S3 is 273850
the one between the centers of balls S and S3 is 213125

each of these distances is less than the sum of the radii of the coresponding spheres.

So the sphere 3 does not intersect any of the others (a simple reasoning shows that are located inside the biggest one)

The system then has no solution at all.

How is it that Maple finds one ?

Did I do some mistake ?


M := 1100: 
p1 := plots:-implicitplot3d(eq1,x=67-M..67+M,y=-400-M..-400+M,z=90-M..90+M,style=surface, color="Niagara Azure"):
p2 := plots:-implicitplot3d(eq2,x=67-M..67+M,y=-400-M..-400+M,z=90-M..90+M,style=surface, color="Gold"):
p3 := plots:-implicitplot3d(eq3,x=67-M..67+M,y=-400-M..-400+M,z=90-M..90+M,style=surface, color="Green"): plots:-display(p1,p2,p3);

@Carl Love  I use the version 2015.2 ; the operating system is OS X el Capitan 10.11


@Carl Love  

Option 1 (:-LinearAlgebra:-Transpose(A)) works perfectly.

Very useful are the variants of  with(...) you have given.

Option 2 : with(Maplets:-Examples, ({Maplets:-Examples:-_pexports()[]} minus {LinearAlgebra})[]);
used this way 

restart:
with(Maplets:-Examples, ({Maplets:-Examples:-_pexports()[]} minus {LinearAlgebra})[]);
A := Matrix(2,2,[1,2,3,4]):
LinearAlgebra:-Transpose(A)

still returns 

"Error, Transpose is not a command in the Maplets:-Examples:-LinearAlgebra package"

... probably something I didn't understand correctly  ?

First 84 85 86 87 Page 86 of 87