From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Combination of variables   with a constraint
Date: Thu, 5 Apr 2012 05:23:18 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 9
Message-ID: <jlja86$raf$>
References: <jli2mb$5b6$> <jli7ag$otd$> <jliokd$sg2$>
Reply-To: <HIDDEN>
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: 1333603398 27983 (5 Apr 2012 05:23:18 GMT)
NNTP-Posting-Date: Thu, 5 Apr 2012 05:23:18 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 3006640
Xref: comp.soft-sys.matlab:763409

look up the help on 'plot'.  the most simple way to plot is just: plot(x,y) (where the vectors x & y have to be of same length)

he suggested a plot of "a/2+15/(32*a) against a". to get that plot, using 'a' between 3/4 and 5/4 (as he suggested):

a=0.75:0.005:1.25;           %creates a row vector of x values
cos_alpha=a/2+15/(32*a); %gives you the values that cos(alpha) have to be
plot(a,cos_alpha)               %makes the plot

i dont know the range of cos_alpha but you might want to fix the axis of the plot so it only plots values of cos_alpha between -1.25 and +1.25 (look this up in the help, im sure there is a good example on how to do this)