Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
%% Visualize the aforementioned code
% Preproc
clear all; clc;
load data001.mat
% Test 1: Create Grid of Data, Interpolate on Values
% So far, this is Kaya code
lim = 1:length(forexeguivelo);
X=forexeguivelo(lim,1);
Y=forexeguivelo(lim,2);
Z=forexeguivelo(lim,3);
C=forexeguivelo(lim,4);
F = scatteredInterpolant(X,Y,Z,C,'nearest');
N = 256;
xi = linspace(min(X(:)),max(X(:)),N);
yi = linspace(min(Y(:)),max(Y(:)),N);
zi = linspace(min(Z(:)),max(Z(:)),N);
[xq,yq,zq] = meshgrid(xi,yi,zi);
cq = F(xq,yq,zq);
disp('Interpolation ended')
%% clip the data
p_up = prctile(cq(:),99);
p_down = prctile(cq(:),1);
cq(cq>p_up) = p_up;
cq(cq<p_down) = p_down;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment