how to plot three dimensional vector in matlab
显示 更早的评论
how to plot a gradient vector which is function of x, y, z, i.e. grad(f(x,y,z)). i need three dimensional plot of this function, where x,y,z are variables. still i unable to plot this function. my function is given by x-component=x.y y-component=x.^2+y.^2 z-component=(z.^2).x.^2+y for any value of x,y,z how this function will look in three dimensional line or surface plot.
回答(1 个)
Walter Roberson
2012-1-14
1 个投票
gradient plots have two values per location, one for the x gradient and one for the y gradient. How do you wish to display the two values simultaneously? For example, are you looking for something like quiver() ?
When you have a function of 3 variables, then you need at least 4 dimensions to represent the output. You can attempt to show the 4th dimension by using color, or by using transparency, or by using dot (sphere) size, or by doing an animation. None of those methods is really satisfying.
You can also use isosurface plots.
类别
在 帮助中心 和 File Exchange 中查找有关 Surface and Mesh Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!