Matlab optimized slice plot

3 次查看(过去 30 天)
Steffen B.
Steffen B. 2024-3-8
Hello,
I have a question regarding the slice plot in matlab.
I solve the temperature field in a cube domain, depending on convective and or temperature boundary conditions. So far no problem, but the result plot is not really nice. When I use the slice function I get this:
But I want a plot like this:
With this shape:
A Cube with a cut out quarter, to present the temperature change over time.
Is it even possible to create such a plot, or is another plot function a better choice?
In addition, a small second question. Can I plot only the temperature isolines on the surfaces?
The slice related code I used is following:
f2 = figure(2);
movegui(f2,[1200 100]);
fontSize=20;
fontSize2=16;
f2.Position(3:4) = [1080 780];
% 3D
h=slice(x,y,z,T,[0 L/2],[H],[B/2 B],'cubic');
set(gca,'FontSize',fontSize)
set(gca,'YDir','normal')
colormap(jet)
shading interp
brighten(jet,.5)
set(h,'edgecolor','black','facealpha',1,'linewidth',1)
xlabel('x-Direction x/ m','FontSize', fontSize)
ylabel('z-Direction z/ m','FontSize', fontSize)
zlabel('y-Direction y/ m','FontSize', fontSize)
axis([0 B 0 L 0 H])
view(30,30)
rotate(h,[1,0,0],-90);
hold on
cb=colorbar("northoutside");
set(cb,'FontSize',fontSize);
caxis([70, 300]);

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Animation 的更多信息

产品


版本

R2016b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by