[code]https://i.stack.imgur.com/U6sVm.png[/code]
White matter subsampled[code]function indices = compute_reduced_indices(before, after)
%% Function to compute the indices of vertices preserved during an operation of
% reducepatch. This allows you to use reducepatch to subsample a surface and
% re-compute an original signal on the vertices for the new subsampled mesh
indices = zeros(length(after), 1);
for i = 1:length(after)
dotprods = (before * after(i, :)') ./ sqrt(sum(before.^2, 2));
[~, indices(i)] = max(dotprods);
end[/code]
But as you might imagine, this is pretty slow, because of the for loop over vertices. I don't have enough memory to vectorize the loop and compute the full dot product matrix in one go.[code]https://i.stack.imgur.com/U6sVm.png[/code]
White matter subsampled[code]function indices = compute_reduced_indices(before, after)
%% Function to compute the indices of vertices preserved during an operation of
% reducepatch. This allows you to use reducepatch to subsample a surface and
% re-compute an original signal on the vertices for the new subsampled mesh
indices = zeros(length(after), 1);
for i = 1:length(after)
dotprods = (before * after(i, :)') ./ sqrt(sum(before.^2, 2));
[~, indices(i)] = max(dotprods);
end[/code]
But as you might imagine, this is pretty slow, because of the for loop over vertices. I don't have enough memory to vectorize the loop and compute the full dot product matrix in one go.[code]https://i.stack.imgur.com/U6sVm.png[/code]
White matter subsampled[code]function indices = compute_reduced_indices(before, after)
%% Function to compute the indices of vertices preserved during an operation of
% reducepatch. This allows you to use reducepatch to subsample a surface and
% re-compute an original signal on the vertices for the new subsampled mesh
indices = zeros(length(after), 1);
for i = 1:length(after)
dotprods = (before * after(i, :)') ./ sqrt(sum(before.^2, 2));
[~, indices(i)] = max(dotprods);
end[/code]
But as you might imagine, this is pretty slow, because of the for loop over vertices. I don't have enough memory to vectorize the loop and compute the full dot product matrix in one go.[code]https://i.stack.imgur.com/U6sVm.png[/code]
White matter subsampled[code]function indices = compute_reduced_indices(before, after)
%% Function to compute the indices of vertices preserved during an operation of
% reducepatch. This allows you to use reducepatch to subsample a surface and
% re-compute an original signal on the vertices for the new subsampled mesh
indices = zeros(length(after), 1);
for i = 1:length(after)
dotprods = (before * after(i, :)') ./ sqrt(sum(before.^2, 2));
[~, indices(i)] = max(dotprods);
end[/code]
But as you might imagine, this is pretty slow, because of the for loop over vertices. I don't have enough memory to vectorize the loop and compute the full dot product matrix in one go.
JLCPCB – Prototype 10 PCBs for $2 (For Any Color)
China’s Largest PCB Prototype Enterprise, 600,000+ Customers & 10,000+ Online Orders Daily
How to Get PCB Cash Coupon from JLCPCB: https://bit.ly/2GMCH9w