2d function in 3d

5 visualizzazioni (ultimi 30 giorni)
felix jose chavez torres
felix jose chavez torres il 25 Gen 2018
Commentato: Star Strider il 26 Gen 2018
i need to show this function y = x^2 in 3d in matlab

Risposta accettata

Star Strider
Star Strider il 26 Gen 2018
Modificato: Star Strider il 26 Gen 2018
Try this:
x = [1;1] * linspace(-4, 4, 25) ;
y = x.^2;
figure(1)
surf(x, y, [zeros(size(x(1,:))); 5*ones(size(x(1,:)))], 'EdgeColor','b')
grid on
view(-75, 45)
EDIT Added plot.
  2 Commenti
felix jose chavez torres
felix jose chavez torres il 26 Gen 2018
thanks!!
Star Strider
Star Strider il 26 Gen 2018
As always, my pleasure!

Accedi per commentare.

Più risposte (1)

Nicolas Schmit
Nicolas Schmit il 26 Gen 2018

Categorie

Scopri di più su Graphics Object Programming in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by