function [y] = puissance(x,n) y = 1 if n > 0 then for i = 1:n y = y*x end end endfunction puissance(2,3)