509 Reputation

16 Badges

12 years, 115 days

MaplePrimes Activity

These are questions asked by Alger


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):...


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);...


The example below is the same as my code:


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);


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


Thanks for reply


First 11 12 13 14 15 Page 13 of 15