optimize a set of discrete data?

optimize a set of discrete data?

Post by ta.. » Mon, 12 Feb 2001 10:37:11



Hi,

I would like to use fminmax to optimize a discrete set of data; that
is, no analytical objective function is available.

The examples from the online manual only shows the optimization of
objective functions. Is it possible to optimize a discrete set of data?

Helen

Sent via Deja.com
http://www.deja.com/

 
 
 

optimize a set of discrete data?

Post by Jason Bowma » Tue, 13 Feb 2001 02:04:37


You can use one of the interpolation functions like interp1,
interp2, interpn, and spline.  Depending on the behavior of
data, you may want to specify a certain type of interpolation
like linear, pchip, or spline.  Splines have a tendency to
oscillate when there shouldn't be any oscillations.

You need to write a function that fminmax will call.  Inside
this function, use the interpolation functions to fit the data.
You may want to create a persistent variable inside this function
to hold the data (read in once), hard code it in, or read it in
every call.  I would use the persistent variable.

Jason


> Hi,

> I would like to use fminmax to optimize a discrete set of data; that
> is, no analytical objective function is available.

> The examples from the online manual only shows the optimization of
> objective functions. Is it possible to optimize a discrete set of data?

> Helen

> Sent via Deja.com
> http://www.deja.com/


 
 
 

optimize a set of discrete data?

Post by ta.. » Tue, 13 Feb 2001 10:49:20


In that case, how do you define the set of design variables?

The following is an example:

FUNCTION:
function yi=test(????);  <--- ???? what are the design variables?

x=[1 4 7 10 5];
y(:,1)=x'.^2;
y(:,2)=x'.^2+0.5;
y(:,3)=x'.^2-0.5;
xi=2*x;
yi = interp1(x,y,xi,'cubic');

MINIMAX:
x0=2;
options = optimset('LargeScale','off');
options = optimset(options,'MinAbsMax',3);

[],options)

Sent via Deja.com
http://www.deja.com/