Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: 3 Y axes wih 4 variable
Replies: 9   Last Post: Apr 24, 2013 9:28 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Murat

Posts: 7
Registered: 4/20/13
Re: 3 Y axes wih 4 variable
Posted: Apr 23, 2013 12:18 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

i got some progress in my programme. now i have a question ; how can i get the curves smooth in this codes? ;

c = [0.008 0.009 0.01 0.01179 0.013 0.015 0.02 0.025 0.03 0.0362 0.04 0.045] ;
h0 = [0.0048 0.00495 0.0049 0.00495 0.00481 0.0048 0.0048 0.00475 0.0042 0.00398 0.004 0.00405];
Q = [1275 1501.9 1725 2100 2388.8 2840.6 3975 5081.3 6198.8 7602 8445 9686];
Qs = [701.25 901.14 1069.5 1491 1767.712 2244.074 3418.5 4522.357 5640.908 7069.86 7938.3 9201.7];
f = [0.00453 0.0042 0.0037 0.0035 0.00325 0.003 0.003 0.0024 0.0022 0.00211 0.00213 0.0021];

%# Some initial computations:
axesPosition = [200 40 1000 500]; %# Axes position, in pixels
yWidth = 30; %# y axes spacing, in pixels
xLimit = [min(c) max(c)]; %# Range of x values
xOffset = -yWidth*diff(xLimit)/axesPosition(3);

%# Create the figure and axes:
figure('Units','pixels','Position',[300 300 750 750]);
h1 = axes('Units','pixels','Position',axesPosition,...
'Color','w','XColor','k','YColor','r',...
'XLim',xLimit,'NextPlot','add');
h2 = axes('Units','pixels','Position',axesPosition+yWidth.*[-1.25 0 1 0],...
'Color','none','XColor','k','YColor','c',...
'XLim',xLimit+[1.25*xOffset 0],...
'XTick',[],'XTickLabel',[],...
'NextPlot','add');
h3 = axes('Units','pixels','Position',axesPosition+yWidth.*[-2.5 0 2 0],...
'Color','none','XColor','k','YColor','g',...
'XLim',xLimit+[2.5*xOffset 0],...
'XTick',[],'XTickLabel',[],'NextPlot','add');
xlabel(h1,'time');
ylabel(h3,'values');

%# Plot the data:
plot(h1,c,h0,'r');
plot(h2,c,Q,'c');
plot(h2,c,Qs,'b');
plot(h3,c,f,'g')


%'XAxisLocation','bottom',...
%'YAxisLocation','left',...



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.