Quantcast
Channel: MATLAB Central Newsreader - tag:"optimization"
Viewing all articles
Browse latest Browse all 130

Re: Optimization using weights

$
0
0
Update:

This code expands the dataset very fast, but then the optimization on the expanded dataset takes days.

_______________________________________________________________

DATA = zeros(sum(weights), size(data,2));
cumsum_weights = [0; cumsum(weights)];

for i = 1:length(weights)
    DATA(cumsum_weights(i)+1:cumsum_weights(i+1),:) = repmat(data(i,:),weights(i),1);
end

Viewing all articles
Browse latest Browse all 130

Trending Articles