How do I plot a 3d shape from a function?

4 vues (au cours des 30 derniers jours)
Rowan Humphreys
Rowan Humphreys le 19 Juin 2022
Commenté : Rowan Humphreys le 24 Juin 2022
I have to plot the following function:
where [c1,c2,c3,c4] = [2.13,2.22,2.62,0.177]
Is there a way of doing this?
Thank you

Réponse acceptée

Hiro Yoshino
Hiro Yoshino le 19 Juin 2022
There is a good example here.
x = -2:0.25:2;
y = x;
if you want to visualize this , then
surf(x,y,x.*exp(-x.^2 -(y').^2))
The point here is y', which enables an implicit expansion. (See here)
You can also perform the same thing by using meshgrid function - this might be easier for you to understand this..

Plus de réponses (0)

Produits


Version

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by