Skip to content

Instantly share code, notes, and snippets.

Created November 25, 2014 05:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/8b3eab89bc708155900c to your computer and use it in GitHub Desktop.
Save anonymous/8b3eab89bc708155900c to your computer and use it in GitHub Desktop.
%% 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