MaplePrimes Questions

Hi everybody,

I have written a module (let's say MyModule) that  I use as a package in a worksheet (with(MyModule)).

At some point in my worksheet I call the procedure MyProc which is part of MyModule.
I find it not to work as expected. So I modify it within MyModule and generate again the archive which contains this module.

Because my worksheet does a lot of things before the call to MyProc, I would like to test quickly the above modifications.
The idea is to do :
unwith(MyModule):  # packages() no longer exhibits its name
with(MyModule);      # to load the corrected one

Unfortunately, contrary to what happens with a "native" package,  the command unwith(MyModule) is ineffective:

  • once done showstat(MyProc) still displays the content of the procedure, and running  the command MyProc(...) proves that it still "exists" in the worksheet
     
  • forcing a reload of MyModule ( with(MyModule) ) and acanning again MyProc ( showstat(MyProc) ) reveals the code MyProc had when MyModule has been loaded for the first time.

 

Is it possible to "free" a user package through the "unwith" command ?

Hope to read you soon, TIA


PS : to be clearer

A worksheet contains  the definition of N procedures, plus the one of MyModule, and ends with the commands to generate an archive file named MyModule.mla.
MyModule is defined that way

MyModule := module()
option package

export Proc1 := eval(:-Proc1),
           ......
           MyProc := eval(:-MyProc),
           ......
           ProcN := eval(:-ProcN):
end module
 

 

hellow can we draw the figure like this

How can I install GeM software from the link http://cpc.cs.qub.ac.uk/?

I have tried many times but I didn't get.

 

@mskalsi

I was trying the direct method for conservation law of wave equation.But the fluxes and conserved density are not coming correct in eq.(4)(see attached file) because (1) and (6) are not same.What mistake have I done?

 

 

wave_eq_3.mws

Dear friends~I knew that I can copy each function's code into one worksheet bue it's tedious if I need to call many functions.So I want to find another approach with maple's statement.

Thank you ~

Hi,

I have problem with plot of the function ( See attachment)
 

Chargement plots

plot((x^3-x^2)^(1/3), x)

 

``

 

 

``

``

``


 

Download PlotProblème.mw

I dont fully understand the principle of a global variable for example _Z in RootOf expressions. Can someone please explain this to me.

Hi I've been trying to solve these set of PDEs below and have been at it for very long

My codes are below

I tried solving the first equation by using:

sys_ode := 2*(diff(T(eta), eta, eta, eta))+T(eta)*(diff(T(eta), eta, eta)) = 0

ics := T(0) = 0, (D(T))(0) = 1, (D(T))(20) = 0

Digits := 10

sol1 := dsolve({ics, sys_ode}, numeric, output = operator)

{q(eta) = rhs(sol1[2](eta)), w(eta) = rhs(sol1[3](eta))}

Then inputting into the subsequent two equations:

PDE1 := eval([2/P . (diff(g(x, eta), eta, eta))+q(eta)*(diff(g(x, eta), eta))-g(x, eta)*w(eta) = 2*x*w(eta)*(diff(g(x, eta), x)), 2/S . (diff(phi(x, eta), eta, eta))+q(eta)*(diff(phi(x, eta), eta)) = 2*x*w(eta)*(diff(phi(x, eta), x))])

subBC1 := -phi(x, 0)*exp(g(x, 0)*sqrt(x)/(1+varepsilon*g(x, 0)*sqrt(x)))

subBC2 := alpha . ((phi(x, 0))(sqrt(x)))(exp(g(x, 0)*sqrt(x)/(1+varepsilon*g(x, 0)*sqrt(x))))

BC := {diff(g(0, eta), eta, eta) = 0, diff(phi(0, eta), eta, eta) = 0, g(0, eta) = 0, g(x, 20) = 0, phi(0, eta) = 1, phi(x, 20) = 1, (D[2](g))(x, 0) = subBC1, (D[2](phi))(x, 0) = subBC2}

P = 1

S = 1

pds := pdsolve(PDE, {BC}, numeric, spacestep = .25)

but always end up with :Error, (in pdsolve/numeric/process_PDEs) number of dependent variables and number of PDE must be the same

I know my BC conditions might probably have some major errors too but i really cant proceed on cos i always end up with this same error. I really hope anyone would be able to help me on this 

help please

Thought it would be a neat way to create identation for loops and if branches in a text editor and copy the code into Maple. But Maple inserts a new prompt at the beginning of every line.

Is there a solution in 2018?

Hi, Is there any way to set the tolerances in

LinearAlgebra[Rank]

I'm evaluating a matrix which is singular, except the singular values come back as 1 and 10^(-9).  I'd like Maple to compute this as rank 1 rather than rank 2.

Thanks

If I input 3^665 the whole number is displayed. How to display only last few digits?

When I make the input 2*pi*440 the output is pi880.

How to come to the result 2764,6 radians?

Coding_Basic_Reproduction_Number_2.mw

Anybody know how to simplify the equation?

Hi,

Some ideas to plot ( animate) tangents at corner point or cusp point?

For examples : f(x)=sqrt(abs(x-1)) , g(x)=sqrt(abs(x^2-4))

Than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5+4*i3*i4^2*i5+4*i3*i4*i5^2

What is the best strategy using Maple(latest version)? In a previous, less complicated example, the polynomial could be not be factored in a single expression, but I was succesfull to factor it in multiple factors.

kind regards,

Harry Garst

First 862 863 864 865 866 867 868 Last Page 864 of 2434