function output = triangle(x, param) center = param(1); base = param(2); index2 = 1:length(x); index1 = find(x>center); index2(index1) = [];