MaplePrimes Questions

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:
I had a few students drop after the first few days of class, and I've deleted their records from the "administration" part of the gradebook in Maple T.A., but their names continue to appear when I generate student statistics reports. Is there a way to prevent their names from appearing the in report? Thanks, Marc
I have a student who missed a Maple T.A. assignment, but he made the work up for me later by turning in a hard copy. Now I'd like to enter his grade and let Maple T.A. continue to keep accurate track of his record, but I can't make this assignment appear on the student's record. Any suggestions? Thanks, Marc
Hello all, I'm trying to use Maple 9.5 to interpolate the data from the points in the worksheet below. I would have attached the 3K file but the web page says the file size is too big. The spline function gives me what appears to be a valid (if big and complicated) piecewise function, but I get an error when I try to plot it. I'm a little confused since I followed the help file for the spline function closely. Any ideas on how to troubleshoot this error? I get "Warning, unable to evaluate the function to numeric values in the region; see the plotting command's help page to ensure the calling sequence is correct"
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
Hi How do i solve a 3. order ODE to a 2. order. I am using maple 10. It seems to me that i am only able to solve to 1. order via the context menu or via the dsolve command. I am a engineer student, and we often need to dsolve from 3. or 4. order down to 1. order including the ones inbetween. I hope you will be able to help me out. TIA Otto
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?
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.
Hi, All, I am trying to solve numerically an ordernary differential equation like this diff(y(x),x) = f(y(x),ya,x) (where ya = y(x=xa), xa a known value) g(y(x=0),ya)=0 The trouble is that the initial value y(x=0) is determined by the second equation which is an implicit equation that has no analytical solution (no explicit expression), and it also depends on the solution at x=xa. Kindly let me know how to write the code to solve it! Thanks. David
Trying to simplify an expression and keep getting the error message "unkown operator". Same error message creeping up a lot now in my efforts to get acquainted with Maple. Getting really annoying and frustrating. Also I'm having trouble looking up specific error messages with the help feature. Is this also possible ? >
Please, i need the code for an implementation of Eratosthenes Sieve, i need a program that calculate primes less or equal than "n", thanks and sorry for my english(i'm from Spain).
How do I round to a certain number of digits after the decimal point? Is there an easier way than the one shown below? > number:=12.3678918; > before:=trunc(number); > after:=number-before; > afterrounded:=evalf[2](after); > roundednumber:=before+afterrounded;
How do I format a set of strings consisting of numbers and normal text strings. I want to label a color bar like it is shown below. Each last digit of a number should be below the last digit of the number in the string above. Is used the following command to create the label of the color bar: c:=textplot([seq([2.42,0.05+i/5*0.95,Join([convert(2*100*i/10,string), "*(max(energy)-min(energy))"])],i=0..5)],align={RIGHT}) P.S.: What is the maximum file size of an attachment to a post? I couldn't attach an image that's 8kb big.
First 1431 1432 1433 1434 1435 1436 1437 Page 1433 of 1437