HI Alan,
Thank you for you reply,
I tried but we are losing some information there..I attached the plot comparsion before and after converting the data, discreate data should follow the countinous data form.
load('DATA.mat');
X3(1) = []; % the first values for X3 and Y are NaNs, so they are removed here
Y(1) = [];
x3 = (0:0.05:2)';
Ydiscrete = zeros(length(x3),1);
for i = 2:length(x3)
ix = find(x3(i-1)<=X3<x3(i));
Ydiscrete(i) = mean(Y(ix));
end
plot(x3,Ydiscrete,'o')
hold on
scatter(X3,Y)