Info
此问题已关闭。 请重新打开它进行编辑或回答。
regarding parfor and brange
2 次查看(过去 30 天)
显示 更早的评论
actually i am working on convolution of an 1D signal all the inputs and outputs are vectors of sizes typically (1,15million) and conv is predefined function in matlab and gaussian filter is an 1d gaussian signal of length (1,100). my code is something like this
for i=1:20
a=conv(input_signal_1,gaussian_filter,'same')
b=conv(input_signal_2,gaussian_filter,'same')
c=conv(input_signal_1.*cos(2i-10),gaussian_filter,'same')
d=conv(input_signal_2.*sin(2i-10),gaussian_filter,'same')
output_1=output_1+(cos(2i-10).*c +sin(2i-10).*d)
end
the time taken for the above task is about 20 seconds with parfor its becoming even more worst even after creating a pool of 4 workers its actually taking 200 seconds with drange time is around 19 seconds actually i want to decrease the time to around 5 seconds how can i do it with parallel computation toolbox my pc is an quadcore i7 2.2 Ghz and has 8gb of ram have matlab 2012b
回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!