Jan 092016
 
This post shows an amazing function to practice with graphics in Octave. The name of the function is allyouneed() and the code is the following:

function allyouneed()

% L
x0= linspace(0.3,30,100);
y0 = 1 ./ x0;
subplot(1,4,1)
plot(x0,y0,’linewidth’,3)
axis off
title(‘All you need is…’)
set(h,’FontSize’,20)

% O
theta=linspace(0,2*pi,100);
x1=2*cos(theta);
y1=2*sin(theta);
subplot(1,4,2)
plot(x1,y1,’linewidth’,3)
axis off

% V
x2=linspace(-6,6,100);
y2=2*abs(x2);
subplot(1,4,3)
plot(x2,y2,’linewidth’,3)
axis off

% E
x3=linspace(0,2*pi,100);
y3=-4*abs(sin(x3));
subplot(1,4,4)
plot(y3,x3,’linewidth’,3)
axis off

allyouneed

Santiago Higuera (9 de enero de 2016)

Sorry, the comment form is closed at this time.