How to generate a surface by a function defined by two sentences?

3 vues (au cours des 30 derniers jours)
João Micheletti
João Micheletti le 21 Juil 2021
Commenté : João Micheletti le 21 Juil 2021
I would like to generate a graphic like this:
(I'm using >> [X,Y]= meshgrid(0:0.01:1,0:0.01:1);
surf(X,Y,X.*Y);
colorbar. To generate this figure).
But for a function defined by two sentences:
  2 commentaires
Walter Roberson
Walter Roberson le 21 Juil 2021
z = cos(2*pi*Y);
mask = X>0;
z(mask) = z(mask) + X(mask).^2.5;
surf(X, Y, Z)
João Micheletti
João Micheletti le 21 Juil 2021
It worked, thanks

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Graphics Object Properties dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by