# Just Launched: You can now import projects and releases from Google Code onto SourceForge

We are excited to release new functionality to enable a 1-click import from Google Code onto the Allura platform on SourceForge. You can import tickets, wikis, source, releases, and more with a few simple steps.

## plotcycleSurf

2010-10-26
2013-01-23
• Hi,
I did spend some time to write a function that plot a limit cycle as a surface in matlab.
I post it here in case someone is interested (it helps to visualize the limit cycle i think) :

function res = plotcycleSurf(xlc,vlc,slc,e)
%
% res = plotcycleSurf(x,v,s,e)
%
% This function plots the cycles x. e is an array which defines
% which coordinates of the differential equation should be used.
% This must be three dimensional and the first element should be
% the bifurcation parameter

global lds

watchon;

hold on;

transparency = 1;

for i=2:size(xlc,2)

%coordinates of current limit cycle
x =  xlc((0:lds.tps-1)*lds.nphase+e(2),i) ;
y =  xlc((0:lds.tps-1)*lds.nphase+e(3),i) ;
a =  ones(lds.tps,1)*xlc(e(1),i);

%coordinates of previous limit cycle
x_previous =  xlc((0:lds.tps-1)*lds.nphase+e(2),i-1) ;
y_previous =  xlc((0:lds.tps-1)*lds.nphase+e(3),i-1) ;
a_previous =  ones(lds.tps,1)*xlc(e(1),i-1);

%period for color
T =  ;
T_previous =  ;

T = ;
x1 = ; x2 = ; x3 = ;

%draw tiangles between the two limit cycles
L = 1:length(x);
tri = [L'  ' length(x)+L'];
trisurf(tri,x1,x2,x3,T,'edgecolor','k','faceAlpha',transparency);

L = length(x) + (1:length(x));

tri = [ L' ' -length(x)+L'+1];
p = trisurf(tri,x1,x2,x3,T,'edgecolor','k','faceAlpha',transparency);

%     if(~isempty(find(==i)))
%             plot3(a,x,y,'k.')
%     end

end