Code covered by the BSD License  

Highlights from
Toolbox Graph

image thumbnail
from Toolbox Graph by Gabriel Peyre
A toolbox to perform computations on graph.

mesh_flip_faces(arg1, arg2, arg3)
function [v,f] = mesh_flip_faces(arg1, arg2, arg3)

if nargin==1
    name = arg1;
    [v,f] = read_mesh(name);
else
    v = arg1;
    f = arg2
end

if size(f,1)~=3
    f = f';
end

f = [f(1,:); f(3,:); f(2,:)];

if nargin==1
    write_mesh(name, v,f);
end

Contact us at files@mathworks.com