patch faster using parallel computing as my code take long time ?
Ältere Kommentare anzeigen
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
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Graphics Performance finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!