load("FractalDimension_UpperD5_parabola.mat")
load("Reconstraction_UpperD5_parabola.mat")
startIndices = find(XLo == -1);
numTrajectories = numel(startIndices);
trajectoriesX = cell(1, numTrajectories);
trajectoriesY = cell(1, numTrajectories);
trajectoriesF = cell(1, numTrajectories);
for i = 1:numTrajectories
trajectoriesX{i} = XLo(startIndices(i):startIndices(i+1)-1);
trajectoriesY{i} = YLo(startIndices(i):startIndices(i+1)-1);
trajectoriesF{i} = FLo(startIndices(i):startIndices(i+1)-1);
trajectoriesX{i} = XLo(startIndices(i):end);
trajectoriesY{i} = YLo(startIndices(i):end);
trajectoriesF{i} = FLo(startIndices(i):end);
for i = 1:numTrajectories
xi = linspace(min(trajectoriesX{i}), max(trajectoriesX{i}), 100);
yi = linspace(min(trajectoriesY{i}), max(trajectoriesY{i}), 100);
[xi, yi] = meshgrid(xi, yi);
interpF = scatteredInterpolant(trajectoriesX{i}, trajectoriesY{i}, trajectoriesF{i}, 'linear', 'none');
surf(xi, yi, zi, 'EdgeColor', 'none', 'FaceColor', 'interp');
h.FontName = 'Times New Roman';
ylabel('Y coordination', 'fontSize', 18);
xlabel('X coordination', 'fontSize', 18);
zlabel('Fractal Dimension', 'fontSize', 18);