Display Matlab 3D matrix in ParaView
Afficher commentaires plus anciens
Hi all,
I have the velocity field of a glacier which I can plot in Matlab (file in attachment). I am however struggling to visualize the same matrix in ParaView in a similar manner as done with Matlab. Can somebody help me with a step-by-step process?
Thanks!
clear all
close all
diff = load('3d_velocity.mat');
diff = diff.diff;
realx = 0:25:(size(diff, 2)-1)*25;
realy = (0:25:(size(diff, 1)-1)*25)';
zeta = linspace(1, 0, size(diff, 3))';
realz = zeta*120;
h = slice(realx,realy,realz,diff, [], [], 1:size(diff,1));
set(h, 'EdgeColor','none', 'FaceColor','interp', 'FaceLighting','gouraud')
colormap(turbo)
shading interp
daspect([0.5 1 .2])
view(-148,25)
set(gcf, 'color', 'white')
xlim([1400 2700])
ylim([0 5500])
zlim([0 200])
ylabel('Distance y (m)')
xlabel('Distance x (m)')
zlabel('Height z (m)')
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Blocked Images dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!