Mathworks File Exchange频道最近更新了一个小函数,可以将三维数据矩阵对应的函数u=f(x,y,z)可视化的显示出来。对我们这些常和数据分析问题打交道的人爱说,还是有点参考价值的.....把它放到这里,供大家参考
1.链接:
http://www.mathworks.com/matlabcentral/fileexchange/48483-3-dimensional-data-visualization?utm_campaign=Feed%3A+mathworks%2FqkjK+%28MATLAB+Central+-+File+Exchange+-+Most+Recent+Files%29&utm_medium=feed&utm_source=feedburner
2.函数的语法格式:
function h=view3d(data,exponent,maxsize,linewidth)
% data: Input data(3 dimensional) % exponent: Exponential scaling factor for values( greater than 1) % maxsize: Maximum point size % linewidth: Edge thickness of points %
clc;clear all;close all; [x,y,z]=meshgrid(-1:0.25:1,-1:0.25:1,-1:0.25:1); t=exp(1-x.^2)+exp(1-y.^2)+exp(z.^2); view3d(t,1.4);
6.The end! Enjoy your happy moring!
原文地址:http://blog.csdn.net/liu6tot/article/details/41241659