I have a set of discrete values say 10 however I wish to make this 100 values as the ten values all step to each other.
Using the stairs(x,y) command I can visualise however I need to expand the y values to 100 so that I can subtract the stair wave from a sine wave which has 100 elements.
%Blooz
function z=interpols(z,order) % Z is the original vector
k=size(z,2);%k is the size of the vector
temp=ones(1,k*order);% A temporary variable
for i=1:k*order
if (i==1)
temp(i)=z(i);
else
temp(i)=z(ceil(i/order));
end
end
z=temp;%result stored in z
end
%End of the Function