<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/239512</link>
    <title>MATLAB Central Newsreader - how to use optimisation tools in Matlab</title>
    <description>Feed for thread: how to use optimisation tools in Matlab</description>
    <language>en-us</language>
    <copyright>&amp;copy;1994-2012 by MathWorks, Inc.</copyright>
    <webmaster>webmaster@mathworks.com</webmaster>
    <generator>MATLAB Central Newsreader</generator>
    <docs>http://blogs.law.harvard.edu/tech/rss</docs>
    <ttl>60</ttl>
    <image>
      <title>MathWorks</title>
      <url>http://www.mathworks.com/images/membrane_icon.gif</url>
    </image>
    <item>
      <pubDate>Wed, 19 Nov 2008 15:46:02 -0500</pubDate>
      <title>how to use optimisation tools in Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/239512#611825</link>
      <author>Matthew </author>
      <description>i am trying to optimise the CL value of an aerofoil by varing a rotation angle theta &lt;br&gt;
&lt;br&gt;
theta is fed into a function i will call 'F' to firstly rotate the co-ordinate points of an aerofoil &lt;br&gt;
&lt;br&gt;
this aerofoil data is then fed into an external programme by 'F'&lt;br&gt;
&lt;br&gt;
the data from the external programme is then called back into my function 'F'&lt;br&gt;
&lt;br&gt;
this data is then plotted by 'F'&lt;br&gt;
&lt;br&gt;
what i am having problems with is using an optimisation technique such as fgoalattain (x=fgoalattain(fun,x0,goal....) or fminimax to have the variable 'x' as theta, but the 'goal' to be finding the correct CL value from my function 'F'.&lt;br&gt;
&lt;br&gt;
what i ultimately want to do is input a Cl value and the optimiser to vary theta until my Cl input value is met.&lt;br&gt;
&lt;br&gt;
i have been pouring over this now for 2 weeks&lt;br&gt;
and i am pulling my hair out.</description>
    </item>
    <item>
      <pubDate>Wed, 19 Nov 2008 17:26:51 -0500</pubDate>
      <title>Re: how to use optimisation tools in Matlab</title>
      <link>http://www.mathworks.com/matlabcentral/newsreader/view_thread/239512#611848</link>
      <author>Stuart Kozola</author>
      <description>Your function F should return the value of CL.  Then you can use &lt;br&gt;
fgoalattain.&lt;br&gt;
&lt;br&gt;
Try this:&lt;br&gt;
x0 = 0; % intial guess at theta, 0 may not be the best choice&lt;br&gt;
weight = 1.0; %With only one goal, this should be set to 1.0.&lt;br&gt;
CLGOAL = %put your goal value here&lt;br&gt;
&lt;br&gt;
optimCL = fgoalattain(@F,x0,CLGOAL,weight);&lt;br&gt;
&lt;br&gt;
Note you need to pass the function F in as a function handle (@F)&lt;br&gt;
And your F function should be defined to return CL, and only accept x, or in &lt;br&gt;
this case, theta as inputs.&lt;br&gt;
&lt;br&gt;
function CL = F(theta)&lt;br&gt;
% run simulation&lt;br&gt;
% return CL&lt;br&gt;
&lt;br&gt;
Stu&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;
&quot;Matthew &quot; &amp;lt;men5mjr@leeds.ac.uk&amp;gt; wrote in message &lt;br&gt;
news:gg1cbq$9gm$1@fred.mathworks.com...&lt;br&gt;
&amp;gt;i am trying to optimise the CL value of an aerofoil by varing a rotation &lt;br&gt;
&amp;gt;angle theta&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; theta is fed into a function i will call 'F' to firstly rotate the &lt;br&gt;
&amp;gt; co-ordinate points of an aerofoil&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; this aerofoil data is then fed into an external programme by 'F'&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; the data from the external programme is then called back into my function &lt;br&gt;
&amp;gt; 'F'&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; this data is then plotted by 'F'&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; what i am having problems with is using an optimisation technique such as &lt;br&gt;
&amp;gt; fgoalattain (x=fgoalattain(fun,x0,goal....) or fminimax to have the &lt;br&gt;
&amp;gt; variable 'x' as theta, but the 'goal' to be finding the correct CL value &lt;br&gt;
&amp;gt; from my function 'F'.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; what i ultimately want to do is input a Cl value and the optimiser to vary &lt;br&gt;
&amp;gt; theta until my Cl input value is met.&lt;br&gt;
&amp;gt;&lt;br&gt;
&amp;gt; i have been pouring over this now for 2 weeks&lt;br&gt;
&amp;gt; and i am pulling my hair out. </description>
    </item>
  </channel>
</rss>

