http://www.mathworks.com/matlabcentral/newsreader/view_thread/288297
MATLAB Central Newsreader  Ploting
Feed for thread: Ploting
enus
©19942015 by MathWorks, Inc.
webmaster@mathworks.com
MATLAB Central Newsreader
http://blogs.law.harvard.edu/tech/rss
60
MathWorks
http://www.mathworks.com/images/membrane_icon.gif

Mon, 02 Aug 2010 03:43:07 +0000
Ploting
http://www.mathworks.com/matlabcentral/newsreader/view_thread/288297#767605
kaleigh
I am trying to plot something in matlab and cannot get anything but the axis showing up..<br>
<br>
I have a 6x6 matrix with sind(i) and cosd(i) in it, where i is an angle I need to vary from 0 to 30 degrees. My code I am using is <br>
<br>
for i = 0:1:30<br>
A= [1 0 0 0 0 1; 0 1 0 1 0 0; 1 0 1 0 1 0; (.3*(cosd(i))) 0 0 0 0 0; ((.3*(sind(i))+.4)) 0 0 0 .8 0; (.3*(cosd(i))) 0 0 .8 0 0];<br>
C = [0; 0; 981; 98.1; 490.5; 0];<br>
D=inv(A);<br>
F=D*C;<br>
plot(F(6,:),i);<br>
end<br>
<br>
Where F= [P, Ryb, Rzb, Rya, Rza, Rxa] and I need the plot of Rxa verse i (030 degrees).<br>
<br>
I am not very familiar with matlab so this maybe completely wrong but please help.

Mon, 02 Aug 2010 04:54:03 +0000
Re: Ploting
http://www.mathworks.com/matlabcentral/newsreader/view_thread/288297#767607
Roger Stafford
"kaleigh " <itsmeklee14@yahoo.com> wrote in message <i35esb$7q4$1@fred.mathworks.com>...<br>
> I am trying to plot something in matlab and cannot get anything but the axis showing up..<br>
> <br>
> I have a 6x6 matrix with sind(i) and cosd(i) in it, where i is an angle I need to vary from 0 to 30 degrees. My code I am using is <br>
> <br>
> for i = 0:1:30<br>
> A= [1 0 0 0 0 1; 0 1 0 1 0 0; 1 0 1 0 1 0; (.3*(cosd(i))) 0 0 0 0 0; ((.3*(sind(i))+.4)) 0 0 0 .8 0; (.3*(cosd(i))) 0 0 .8 0 0];<br>
> C = [0; 0; 981; 98.1; 490.5; 0];<br>
> D=inv(A);<br>
> F=D*C;<br>
> plot(F(6,:),i);<br>
> end<br>
> <br>
> Where F= [P, Ryb, Rzb, Rya, Rza, Rxa] and I need the plot of Rxa verse i (030 degrees).<br>
> <br>
> I am not very familiar with matlab so this maybe completely wrong but please help. <br>
           <br>
You need to do a "hold on" so that the successive points plotted do not erase previous points. If you look carefully at your plot you should see the last surviving point there as a single tiny point for i = 30.<br>
<br>
Another way is to store successive values of Rxa in an array and do the plot on this array versus the array 0:30 .<br>
<br>
Roger Stafford

Mon, 02 Aug 2010 05:01:05 +0000
Re: Ploting
http://www.mathworks.com/matlabcentral/newsreader/view_thread/288297#767609
William
Is the vector 'A' significant to somthing? Was it just a matrix you need to recreate?

Mon, 02 Aug 2010 06:56:02 +0000
Re: Ploting
http://www.mathworks.com/matlabcentral/newsreader/view_thread/288297#767621
Ross W
"Roger Stafford" <ellieandrogerxyzzy@mindspring.com.invalid> wrote in message <i35j1b$pal$1@fred.mathworks.com>...<br>
> "kaleigh " <itsmeklee14@yahoo.com> wrote in message <i35esb$7q4$1@fred.mathworks.com>...<br>
> > I am trying to plot something in matlab and cannot get anything but the axis showing up..<br>
> > <br>
> > I have a 6x6 matrix with sind(i) and cosd(i) in it, where i is an angle I need to vary from 0 to 30 degrees. My code I am using is <br>
> > <br>
> > for i = 0:1:30<br>
> > A= [1 0 0 0 0 1; 0 1 0 1 0 0; 1 0 1 0 1 0; (.3*(cosd(i))) 0 0 0 0 0; ((.3*(sind(i))+.4)) 0 0 0 .8 0; (.3*(cosd(i))) 0 0 .8 0 0];<br>
> > C = [0; 0; 981; 98.1; 490.5; 0];<br>
> > D=inv(A);<br>
> > F=D*C;<br>
> > plot(F(6,:),i);<br>
> > end<br>
> > <br>
> > Where F= [P, Ryb, Rzb, Rya, Rza, Rxa] and I need the plot of Rxa verse i (030 degrees).<br>
> > <br>
> > I am not very familiar with matlab so this maybe completely wrong but please help. <br>
>            <br>
> You need to do a "hold on" so that the successive points plotted do not erase previous points. If you look carefully at your plot you should see the last surviving point there as a single tiny point for i = 30.<br>
> <br>
> Another way is to store successive values of Rxa in an array and do the plot on this array versus the array 0:30 .<br>
> <br>
> Roger Stafford<br>
<br>
In addition to Roger's suggestion, you might also consider replacing<br>
<br>
plot(F(6,:),i);<br>
<br>
by <br>
<br>
plot(F(6,:),i, 'o');<br>
<br>
or some other marker. Read the help for plot to learn more...<br>
<br>
Cheers,<br>
Ross