Path: news.mathworks.com!not-for-mail
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$1@newscl01ah.mathworks.com>
References: <jli2mb$5b6$1@newscl01ah.mathworks.com> <jli7ag$otd$1@newscl01ah.mathworks.com> <jliokd$sg2$1@newscl01ah.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: www-04-blr.mathworks.com
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
X-Trace: newscl01ah.mathworks.com 1333603398 27983 172.30.248.35 (5 Apr 2012 05:23:18 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 5 Apr 2012 05:23:18 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 3006640
Xref: news.mathworks.com 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)