how to plot f(x)=1/2(x1^2+x2^2+x3^2)?
2 次查看(过去 30 天)
显示 更早的评论
I am new to MATLAB .how to plot f(x)=1/2*(x1^2+x2^2+x3^2). a function of 3 variables?. I have almost tries all options for plot.
0 个评论
回答(1 个)
John D'Errico
2018-3-21
编辑:John D'Errico
2018-3-21
Computers have screens that are TWO dimensional. Your brain understands how to look at a picture. It can even understand a 3-d scene, either by stereo clues, or by inference, because you expect a scene has depth in it. So your brain can use clues from the scene to infer depth, thus lines that should be parallel that converge with distance. Sometimes rotating a 3-d plot can give you the hints your brain will need. But anyone who has ever looked at an Escher print will understand the difficulties, even for a 3-d scene.
So in general, your brain can visualize a 2 or 3 dimensional image.
You want to plot a FOUR dimensional thing. Thus z = f(x1,x2,x3).
Do you have a hyper-dimensional monitor? A holodeck perhaps? Mine is still at the shop, waiting for parts from StarFleet supply. They tell me it might take hundreds of years before those parts arrive.
Occasionally people try to use a kluge like Chernoff faces to visualize higher dimensional information.
Another tool is to use iso-surfaces, perhaps a decent solution here, like a contour plot in 3-d. In other cases, color can be used to visualize information in higher dimensions.
Finally, you can use animation, using time as a 4th dimension, so a shape that varies with time.
No matter what though, 4-d is hard to visualize, because your brain understands a 3-d world.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!