Items tagged with example example Tagged Items Feed

Optimization with NLPSolve

September 06 2010 by Kamel 36 Maple 14

Hi

The example below is the same as my code:

restart:with(Optimization):f:=(a+2*b+c*d)*sin(wr*p*t);

fmoy := p*wr*(int(f, t = 0 .. Pi/p/wr))/Pi;

fmax:=NLPSolve(f,t = 0 .. 2,a=1..5,b=0.1..0.5,c=0.4..0.8,d=10..20,wr=200..300,p=5..20,maximize);

fmin:=NLPSolve(f,t = 0 .. 2,a=1..5,b=0.1..0.5,c=0.4..0.8,d=10..20,wr=200..300,p=5..20);

Taux:=NLPSolve((fmax-fmin)/fmoy,t = 0 .. 2,a=1..5,b=0.1..0.5,c=0.4..0.8,d=10..20,wr=200..300,p=5..20);

Hi,

I'm trying to use a simple DLL in maple, which I create based on Maple external linking examples..

int __stdcall mult( int a, int b )
    {
         return a * b;
    }

and I compiled it with Visual Studio 2010 compiler, but when I use it in Maple I recieve the error

"Error, external linking: error loading external library"

thanks

 

This is the fourth and final part of a blog post, the first three parts of which can be found here: Generating Samples from Custom Probability Distributions (I)

This is the third post in a four-part series; the earlier posts are Generating...

This is the second post in a four-part series that started with this post: Generating...

Maple's Statistics package contains many predefined probability distributions; well-known ones such as the normal distribution and lesser-known ones such as the Gumbel distribution. For these distributions, we ship efficient algorithms that can quickly generate a large number of sample points. To generate a sample of size 10 of both of these distributions, and print the time it took to do this (in seconds), you can run the following:

with(Statistics):

There are two pieces of extended functionality that I quite often want from the Maple Compiler. The first (task A) is to be able to link in and use an arbitrary function from some other external ("3rd party") shared library, within my Compile'd Maple procedure. The second (task B) is to directly call the compiled Maple procedure from within some computational routine in a 3rd party shared library (which I would then access using define_external). This post is about the first of those, task A.

Maplesoft Employee

Understanding the Question

July 23 2010 by rlopez 263 Maple

The hardest and/or most important part of answering a question is making sure the real question is understood. The July 1, 2010 question Using fsolve with a dispersion relation posted to MaplePrimes seemed to be about obtaining a numeric solution of an equation. Turns out it was more a question about the behavior of an implicit function.

For example, the simple pendulum length changes by the law

l = l_0+a*t

where a - constant, t - time, l_0 - link length at t=0.

How it is possible to model such system? Is it possibly to change r_XYZ in Rigid Body Frame under this law or it is necessary to go by another way?

The Maple ?Compiler can compile a limited subset of Maple commands to native code. The result is substantially faster than running interpreted Maple code. This article shows how you can save a compiled procedure for reuse.

When a Maple procedure is compiled, a shared object library (dynamic-linked library for Windows) is created on the file system, as a temporary file.  When the Maple...

Hi friends,

It is a simple question but I got confused... The best way to explain the problem is the example below (I modified my example to make it more clear and easier):

gCount := 1;

hCount := 5;

dCount := 10;

lineCounter := 1;

for k to gCount do

  for i to hCount do

    for j to dCount do

Thanks to everyone who helped me with the last question. Unfortunately its a double integral, so its even more complicated than I think the program can handle. I tried to approximate the function with mtalyor

 

l := sqrt(1+cos(x)*cos(y)*cos(x+y));

 

however when I plot this function as for example:

 

w = mtaylor(l, [x, y], 5)

 

this function gets worse and worse, it gets flatter, and flatter,...

Hi friends,

I have plotted a 3d function by plot3d (z=f(x,y)) , but at the same time I need to know the values of z and also the relevant x's and y's. In fact, when I extract z's from it via "op" function, I don't know to which (x,y) it relates. The only thing I get is the range of x,y, for example 1..5.

Thanx!

Hello everyone, I wonder how to carry out the so-called total derivative over a certain function with retaining the differential symbol "d". For example y=r*sin(theta) then how to obtain the following result from maple dy=r*cos(theta)d(theta)+sin(theta)dr. Thank you.

generic identity matrix

June 01 2010 by Jorge Delgado 52 Maple
Hi, is there in Maple a generic identity matrix, i.e. with (symbolic) identity matrix behavior? I need it in order to perform some symbolic matrix computations, for example: (I-A).(I+A+A^2+...) Thanks,
1 2 3 4 5 6 7 Page 1 of 84