Matlab 高脚杯模型切片
来源:互联网 发布:天猫数据 编辑:程序博客网 时间:2024/04/25 10:09
有兴趣的可以下载数据,跑程序试一下。也可以单独看看代码,看下实现过程。
- 主函数
% xls_data=xlsread('data_more.xls');% x=xls_data(1:3:end);% y=xls_data(2:3:end+1);% data=[x,y];% save('data.mat','data');clc,clearload data.matx=data(:,2);y=data(:,1);yy=smooth(y);figureplot(yy,x,'.r');axis equalgrid ontitle('orig data');%% 拟合% xx=[min(x):0.1:max(x)]';% fitsize=4;%拟合次数自己定义% p=polyfit(x,y,fitsize);% f=polyval(p,xx);% figure% plot(f,xx,'linewidth',2);% axis equal% grid on% title('fit data')%%figure[X,Y,Z] = cylinder(yy(end:-1:1));[m,n]=size(X);color=ones(m,n);h=surf(X,Y,Z);alpha(0.8)%设定透明度CM=[1,0,1];CM=repmat(CM,32,1);colormap(CM);lighting gouraud;camlight;shading interptitle('the model')%%% figure% pcolor(X,Y,Z);shading interp%伪彩色图% figure% contourf(X,Y,Z) %等高线图% view(3)% figure,surf(X,Y,Z)%三维曲面%% 曲线个数为20 slice图figureplot_hor(X,Y,Z,1,10,518,'m');grid onplot_hor(X,Y,Z,100,5,400,'m');title('slice')%% 骨架图 virtical and horizontalfigureplot3(X,Y,Z,'linewidth',2,'color','b')hold onplot_hor(X,Y,Z,1,5,518,'b');grid ontitle('framework');
- 被调用函数,用于绘制高脚杯骨架
function plot_hor(x,y,z,First1,Step1,End1,color)for i=First1:Step1:End1x_hor=x(i,1:21);y_hor=y(i,1:21);z_hor=z(i,1:21);plot3(x_hor,y_hor,z_hor,'linewidth',2,'color',color);hold onendend
- 大致结果如下:
有兴趣的可以下载数据,跑程序试一下。也可以单独看看代码,看下实现过程。
- 主函数
% xls_data=xlsread('data_more.xls');% x=xls_data(1:3:end);% y=xls_data(2:3:end+1);% data=[x,y];% save('data.mat','data');clc,clearload data.matx=data(:,2);y=data(:,1);yy=smooth(y);figureplot(yy,x,'.r');axis equalgrid ontitle('orig data');%% 拟合% xx=[min(x):0.1:max(x)]';% fitsize=4;%拟合次数自己定义% p=polyfit(x,y,fitsize);% f=polyval(p,xx);% figure% plot(f,xx,'linewidth',2);% axis equal% grid on% title('fit data')%%figure[X,Y,Z] = cylinder(yy(end:-1:1));[m,n]=size(X);color=ones(m,n);h=surf(X,Y,Z);alpha(0.8)%设定透明度CM=[1,0,1];CM=repmat(CM,32,1);colormap(CM);lighting gouraud;camlight;shading interptitle('the model')%%% figure% pcolor(X,Y,Z);shading interp%伪彩色图% figure% contourf(X,Y,Z) %等高线图% view(3)% figure,surf(X,Y,Z)%三维曲面%% 曲线个数为20 slice图figureplot_hor(X,Y,Z,1,10,518,'m');grid onplot_hor(X,Y,Z,100,5,400,'m');title('slice')%% 骨架图 virtical and horizontalfigureplot3(X,Y,Z,'linewidth',2,'color','b')hold onplot_hor(X,Y,Z,1,5,518,'b');grid ontitle('framework');
- 被调用函数,用于绘制高脚杯骨架
function plot_hor(x,y,z,First1,Step1,End1,color)for i=First1:Step1:End1x_hor=x(i,1:21);y_hor=y(i,1:21);z_hor=z(i,1:21);plot3(x_hor,y_hor,z_hor,'linewidth',2,'color',color);hold onendend
- 大致结果如下:
0 0
- Matlab 高脚杯模型切片
- Matlab 根据轮廓线获取高脚杯模型
- 歌曲时间切片Matlab程序
- 【Matlab制作目标切片脚本】
- matlab验证中心切片定理
- 用MATLAB绘制球体的切片
- 关于Flash Player的“跑道/切片模型”
- 切片
- 切片
- 切片
- 切片
- 切片
- 切片
- 切片
- 切片
- Maya Mel 循环生成高脚杯
- DBT乳腺切片投影及重建(MATLAB版)
- Matlab 隐马尔可夫模型应用
- NSString 去掉首尾空格
- 分析用例分析图、找业务对象、画面向对象设计用例描述
- Matlab slice方法和包络法绘制三维立体图
- [设计模式]外观模式(Facade)
- 第一次做BFS
- Matlab 高脚杯模型切片
- Dubbo架构设计详解
- Java基础--代理模式(静态、动态)
- ubuntu 安装Elasticsearch5.0(Debian包)
- [分享]ip地址爬取过滤的shell
- Dubbo实现RPC调用使用入门
- 在Windows上安装Elasticsearch 5.0
- js中innerHTML与innerText的用法与区别
- JDBC