[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
problem with subplot
From: |
Gunnar |
Subject: |
problem with subplot |
Date: |
Tue, 22 Feb 2005 11:43:34 -0600 |
User-agent: |
KMail/1.7.2 |
I'm trying to create a subplot (with 2 plots). The code is attached below.
The result is just one plot, the right one, and it is not properly scaled so
I can only see half the righthand plot. What can be wrong with this?
I'm using version 2.1.64 on my Linux box.
Gunnar.
x=linspace(0,6);
for i=1:4
y(i,:)=cos(i*x);
end
subplot(1,2,1);
plot(x,y(1,:),';x=1;');
hold on
plot(x,y(2,:),';x=2;');
plot(x,y(3,:),';x=3;');
plot(x,y(4,:),';x=4;');
title('Funktionen y=cos(kt)');
hold off
subplot(1,2,2);
x=linspace(0,20);
plot(x,exp(-x/4));
hold on;
plot(x,exp(-x/4).*sin(x));
title('f(x)=exp(-x/4)sin(x)');
text(5,0.38,'exp(-x/4)');
hold off;
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------