Borrar filtros
Borrar filtros

how to plot f(x)=1/2(x​1^2+x2^2+x​3^2)?

2 visualizaciones (últimos 30 días)
Karthi Ramachandran
Karthi Ramachandran el 21 de Mzo. de 2018
Comentada: Karthi Ramachandran el 22 de Mzo. de 2018
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.

Respuestas (1)

John D'Errico
John D'Errico el 21 de Mzo. de 2018
Editada: John D'Errico el 21 de Mzo. de 2018
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.
  5 comentarios
Karthi Ramachandran
Karthi Ramachandran el 22 de Mzo. de 2018
oh god, this never ends, I have tried all those well before posting the question. Posting question was very last option as mathematica was able to show me a visualization. Question was never about optimization(as it will never be and you need not chase behind either).The detailed question I added later as it will serve to know why I ask some way to plot. Its actually a sphere and two plane(which all can visualize). Its a simple 3D problem actually can be solved by hand. I was just stuck with visualisation. help if you can or i think MATLAB is unable and will resort to other . Pls dont answer rude and sarcastic without understanding what i actually want. The latter part of comment was only to impose the problem(I DO NOT WANT OPTIMIZATION)
in all the world the first question was a sphere. and pls dont tell me to look for "spehre command".
Karthi Ramachandran
Karthi Ramachandran el 22 de Mzo. de 2018
Help if you can or kindly stop commenting. If you cant leave it, no need to show your expertise as its hurting the level of badges(am sorry to say this). there was no politeness in your answer. If am wrong for something I am very sorry.

Iniciar sesión para comentar.


Más información sobre Lighting, Transparency, and Shading en Help Center y File Exchange.


Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by