You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

9 lines
128 B

function [c] = sinspace(a, b, n)
c = zeros(1, n);
ind = [0:pi/n:pi];
for i=1:n
c(i) = a + (b-a)*sin(ind(i));
end
return;