Maple Questions and Posts

These are Posts and Questions associated with the product, Maple
Hi, Colleagues, I need to use two colors for positive and negative values of a plotted function and I am trying to use a piecewise switch. My atempt was something like plot(sin(x), x=0..13, color=(x->piecewise(sin(x)
What does "Warning, `delta_Ia_con_p` is implicitly declared local to procedure `inductor_current_RMS_AVG_p`" exactly mean?

I get this, when I execute the following procedure:

# art=0 returns RMS current and art=1 returns AVG current
> inductor_current_RMS_AVG_p:=proc(Ue,Ua,Ia,L,T,art)
>
> delta_Ia_con_p:=(Ue-Ua)/L*Ua/Ue*T;
> inititial_inductor_current_con_p:=Ia-delta_Ia_con_p/2;
> initial_inductor_current_p:=piecewise(Ia<eval(IaLG_boundary_condition), 0, inititial_inductor_current_con_p);
> # initial_inductor_current_input:=initial_inductor_current;
> inductor_current_increase_p:=initial_inductor_current_p+(Ue-Ua)/L*t;
This blog entry evolved from my reply to Moira Chas's post. I want to thank her for initiating such an interesting topic. Usually Mandelbrot set is drawn in Maple using plot3d command. That also can be done using densityplot. In the example below I use mandelbrot from John Oprea's worksheet,
mandelbrot := proc(x, y) 
local c, z, m; 
c := evalf(x+y*I); z := c; 
for m to 50 while abs(z) < 2 do z := z^2+c od; 
m end;

plots[densityplot](mandelbrot,-2 .. 0.7, -1.35 .. 1.35,
s_tyle=patchnogrid,colorstyle=HUE,numpoints=62500,axes=none);
Hi, Colleagues, I need strongly reduce Maple generated graphs for a journal publication. How could I make the axes and tickmarks thicker? Thanks, Evgeni
Why do I get the same output with the two following statements plot3d(0, 0..20, 0..70, color=proc(x,y) 200000*x end proc); plot3d(0, 0..20, 0..70, color=proc(x,y) x end proc); How does the option "color=proc() ..end;" works? How can I choose the colors? (The reason behind my question is that I am trying understand how to plot the Mandelbrot set)
SOS! I need to find how to plot y=f(x) if x and y are columns of 2D matrix. Thanks, Evgeni
I have a module with an exported procedure defined by define_external, like this:

loadtest := module()
export hb;
option package;
hb:=define_external(
`hb`,
`MAPLE`,
`LIB`="/home/hans/system/maple/libhb.so");
end module:

This works if I put the code above into a .mpl file, and use read to load it. The problem is that I would like to save this module to a maple library:

> libname;
"/home/hans/system/maple", "/usr/local/maple8/lib"
> savelibname:="/home/hans/system/maple/loadtest.lib":
> march('create',savelibname,100);
> savelib('loadtest');
> map( march, [ 'gc', 'reindex', 'pack' ], savelibname ):

When I try to use this newly created library after restarting maple the following happens:

> A:=Matrix([[3,2,1,-2,-1,-4],[1,0,1,0,-1,0]]):
> with(loadtest);
[hb]
> hb(A);
[3 2 1 -2 -1 -4]
CALL_EXTERNAL([ ])
[1 0 1 0 -1 0]

Hi everybody, in Maple 9.5 I need to generate two Vectors of random generated numbers from a normal distribution with a certain correlation. The correlation should be an input factor. Does anyone know how to do that?
Hello everyone, my first post here. I'm studying mechatronic engineering at university so Maple is somewhat of a godsend. I got Maple 9.5 some years ago and it worked perfectly. But sometime last year it started going wrong. Whenever I tried to start standard maple it would give me some cryptic errors and refused to start. I had to resort to using Maple classic worksheet and it works just fine. Try as I might I could not discern the cause of my problems. I tried disabling my firewall and a number of other suggested fixes, none of which helped. Recently I was given Maple 10.0 and I thought installing it might fix my problems. I wasn't so lucky. I get essentially the exact same error when attempting to start Maple 10.0:
The help page ?UndocumentedNames lists a few of the undocumented procedures in Maple. For example: inner - computes the inner product (dot product) of two lists MorrBrilCull - subroutine used by ifactor evalgf1 - used by `mod/Gcd` etc.
Of course, there are big differences in dsolve and dsolve numeric. But also there is a difference that is subtle. It would be nice if this subtle one were not there. It may be that there is an easy work-around. Of course, the complication that is at the root of the problem may not be subtle at all. Look at the results of these two situations. First situation. > restart; > h[0]:=t->(1+t)*t^2*cos(t): > sol1:=dsolve({diff(y(t),t)=-h[0](t-1),y(0)=h[0](0)},y(t)): > h[1]:=unapply(rhs(sol1),t): > sol2:=dsolve({diff(y(t),t)=-h[1](t-1),y(1)=h[1](1)},y(t)): > h[2]:=unapply(rhs(sol2),t): > plot([[t,h[0](t),t=-1..0],[t,h[1](t),t=0..1], [t,h[2](t),t=1..2]],color=blue); Second situation
Entering

Tst0:= 0.5, 27.1, 0.1, 0.2, 24.0;
tst0:= beta=Tst0[1], lambda=Tst0[2], sigma=Tst0[3], P=Tst0[4], M=Tst0[5];

someFct([1/2*P, 1/lambda*beta],[(lambda+beta)/lambda],-sigma*(1+z)^lambda);
eval(%,evalf([tst0])); subs(z=0.1, %);

myTerm:=subs(someFct=hypergeom,%);

and using evalf(myTerm) I get .9981665521 while evalhf(myTerm) gives me

Error, remember tables are not supported in evalhf

What happens here?
Similarly to Binary Arithmetic, Octal Arithmetic can be done using following module,
Silvexil announced in his blog a Binary Arithmetic package. Here is my version of it.
I'm trying to trap the exception generated when the member operator (:-) is used with a variable that is not a module. I thought the following would work:
restart;
proc()
    try
        NotAModule:-mem();
    catch "`NotAModule` does not evaluate to a module":
        print("it worked")
    catch:
        print("it failed");
        print(StringTools:-FormatMessage(lastexception[2..-1]));
    end try
end proc();
                                  "it failed"

                 "`NotAModule` does not evaluate to a module"
Any ideas how to fix this? The generated exception string should match the first catch statement.
First 2175 2176 2177 2178 2179 2180 2181 Page 2177 of 2181