Alger

509 Reputation

16 Badges

12 years, 115 days

MaplePrimes Activity


These are questions asked by Alger

Hi,

I have this procedure:

f := proc(x) if x < 0 then x^2+1; else cos(x); end if; end proc:

When I calculate NLPSolve(f,-Pi..2*Pi); the result is good. In NLPSolve, f(Pi) or f(-Pi) are also calculated.

When I want to determine f(Pi), I have this error code:

Error, (in f) cannot determine if this expression is true or false: Pi < 0

Why ? 

I must change my procedure with adding "evalf" to get a result for f(Pi):...

Hi

It is not corect in my problem to get different parameters a, b, c, ... for fmin, fmax and the objective function.

The probleme is to minimize the objective function (fmax-fmin)/fmoy.

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

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 have some difficulties in manipulating matrices in Maple

For example, I have a matrice with 40 rows and 9 columns ans I want to extract the odd rows taking columns inchanged. The new matrice which has 20 rows and 9 columns must replace the old matrice

In Matlab, I do this with only one command: WTable=WTable(1:2:40,:);

Thanks in advance for help

Hi

Thanks for reply

sgn:=(-1)^(r-1);

First 11 12 13 14 15 Page 13 of 15