memory leak in datasample
Show older comments
Hi,
I seem to be suffering from a memory leak from datasample. Does anyone else suffer from a memory leak in the following code?
Thanks!
close all;
clear all;
weights = abs(rand(100,1));
weights = weights./sum(weights);
nn = 1:100;
for i = 1:10000000
ix = datasample(1:100,20,'Weights',weights,'Replace',false);
end
Answers (0)
Categories
Find more on Get Started with MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!