-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDiscretization.m
More file actions
11 lines (10 loc) · 829 Bytes
/
Discretization.m
File metadata and controls
11 lines (10 loc) · 829 Bytes
1
2
3
4
5
6
7
8
9
10
11
%% Second section: Defining the variables
N = length(Data); % Dimension of the array
dT = pi/N; % Step
dB = dX; % Step of voxels
L = dB*N; % Length of the side of the square
%% Third section: Theta, Phi, S generation
Theta = (dT/2):dT:(pi - dT/2); % Theta array, notice the ofset, adjusted to get N values
Phi = Theta - pi/2; % Phi array using Theta, notice that phi stays inside -pi/2 to pi/2, adjusted to get N values
Smax = L/2; % Maximal S as derived on the drawing
S = (-Smax+dB/2):dB:(Smax-dB/2); % S array, adjusted to get N values