首先分享網址:https://blog.csdn.net/weixin_41923961/article/details/80487190
其次,他百度網盤鏈接被禁,我新產生了一個鏈接:https://pan.baidu.com/s/1GhqZdHAOmc276EG7-pJ_xA
提取碼:4n06
復制這段內容后打開百度網盤手機App,操作更方便哦

我不像此文章作者不看評論,我經常看,如果鏈接失效請第一時間通知我,
再有就是用法:
clc,clear
v=csvread('vdata.txt');
load test
v=reshape(v,5,27,6);
[x,y,z]=meshgrid(1:27,1:5,1:6);
h=figure(1);
set(h,'name','取單切片')
subplot(221)
slice(x,y,z,v,[],[1],[]);
shading interp
set(gca,'zdir','reverse');
axis equal
grid on
subplot(222)
slice(x,y,z,v,[],[2],[]);
shading interp
colormap('jet')
set(gca,'zdir','reverse');
axis equal
grid on
subplot(223)
slice(x,y,z,v,[],[3],[]);
shading interp
set(gca,'zdir','reverse');
axis equal
grid on
subplot(224)
slice(x,y,z,v,[],[4],[]);
shading interp
set(gca,'zdir','reverse');
axis equal
grid on
h2=figure(2);
set(h2,'name','全空間切片','MenuBar','none','ToolBar','none')
slice(x,y,z,v,[1:2:27],[2 3 4],[2 3 4 5])
shading interp
colorbar
colormap('jet')
set(gca,'zdir','reverse');
axis equal
grid on
box on
h3=figure(3);
set(h3,'name','定值包絡立體圖','MenuBar','none','ToolBar','none')
set(gcf,'InvertHardcopy','off')
fw=150; %%此值為最外層包絡面取值
fv=isosurface(x,y,z,v,fw);
p=patch(fv);
set(p,'facecolor','b','edgecolor','none');
patch(isocaps(x,y,z,v, fw), 'FaceColor', 'interp', 'EdgeColor', 'none');
colorbar
colormap('jet')
box on
daspect([1,1,1])
view(3)
set(gca,'zdir','reverse','color',[0.2,0.2,0.2]);
camlight
camproj perspective
lighting phong
axis equal
grid on
title(['最外層表面的值為: ' , num2str(fw)]);
希望大家喜歡
uj5u.com熱心網友回復:
另外我再發一個求平面外包絡線的方法,同樣是matlab:
x = gallery('uniformdata',[10,1],0);
y = gallery('uniformdata',[10,1],1);
x=[1;1;2;3;4;2;4.5;6;8]
y=[2;4;2;3;10;1;3.8;2;10]
%z=[2;4;2;3;10;1;3.8;2;10]
DT = delaunayTriangulation(x,y);
k = convexHull(DT);
figure
plot(DT.Points(:,1),DT.Points(:,2), 's','markersize',10,'linewidth',3);
hold on
plot(DT.Points(k,1),DT.Points(k,2),'r')
hold off
分享自:
https://www.zhihu.com/tardis/sogou/qus/286312949
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/244440.html
標籤:一般軟件使用
