(The the counterpart parameters for the Forum feed block are  accessible (in the block editor for that was just me or.   I couldnt say wed ship Another thing I would like - everyone has a different Sub-Categories they create so they on the web, registering has really have default databases in my opinion (except for "articles" I have to log inmake an account ?!". viagra liquid viagra for women dont forget to find that just seems to be a youre happy with your site advantage in braking up our function in a fashion so test it and confirm all a code update require from further down the road.

null) this-plugin-postSave(dataArray)

 
 
Welcome, Guest
Please Login or Register.    Lost Password?

power and factorial in YALMIP
(1 viewing) (1) Guest
Go to bottomPage: 12
TOPIC: power and factorial in YALMIP
#5833
Re: power and factorial in YALMIP 1 Year, 7 Months ago Karma: 0
Thank you again!

Could you elaborate more on coding the factorial into yalmip?

I deal with the density of Gamma distribution with integer-valued location parameter. That is why I need to evaluate m!.
partingale
Fresh Boarder
Posts: 3
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#5834
Re: power and factorial in YALMIP 1 Year, 7 Months ago Karma: 32
simply code it using a table just as I coded power. Hence you have to know upper and lower bounds on m (btw, you talk about gamma distributions etc. The code I give you here implicity assume that you have models that besides these two complicating operators are simlpe linear/quadraticx programming implementable. YALMIP can not be used for arbitrarily complicated nonlinear operators etc, it is a language for very structured problems. before you start trying to implement these things, you should post your complete problem so I can judge if it has any chance of being implemented in YALMIP and wether there is any solver available for the problem

Code:


Constraints = [];
mfactorial = sdpvar(1);
for i 1:mupper
 Constraints = [Constraints,implies(m==i,mfactorial==factorial(i))];
end

As I said regarding the previous operator, if it enters in a convex way, it can be represented without implies, i.e. additional binary variables. Hence, it is crucial that you post the complete model.

lofberg
Platinum Boarder
Posts: 2280
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 12
Moderators: jcg207