patch faster using parallel computing as my code take long time ?
显示 更早的评论
I have a strcturce CC having 2499 objects. While ploting the it takes long time due to length of CC. Is it possible to make code to run using parallel computing matlab to plot faster?
CC file is uploaded to drive: https://drive.google.com/file/d/16iDAcBzSN42h-tk6c3AD5ClF5VaGppy6/view?usp=sharing
colors = colormap(jet);
load("CC.mat"); % You can download the file from Link: https://drive.google.com/file/d/16iDAcBzSN42h-tk6c3AD5ClF5VaGppy6/view?usp=sharing
j=0;
for i = 1:2499
V = zeros([526 526 551]);
pin = CC.PixelIdxList{1,i};
V(pin) = 1;
[faces,verts] = isosurface(V,0.5);
p = patch('Faces',faces,'Vertices',verts);
if mod(i,255) ==0
j=1;
else
j=j+1;
end
p.FaceColor = colors(j,:);
p.EdgeColor = 'none';
hold on
end
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Graphics Performance 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!