2d function in 3d

5 views (last 30 days)
felix jose chavez torres
felix jose chavez torres on 25 Jan 2018
Commented: Star Strider on 26 Jan 2018
i need to show this function y = x^2 in 3d in matlab

Accepted Answer

Star Strider
Star Strider on 26 Jan 2018
Edited: Star Strider on 26 Jan 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 Comments
felix jose chavez torres
felix jose chavez torres on 26 Jan 2018
thanks!!
Star Strider
Star Strider on 26 Jan 2018
As always, my pleasure!

Sign in to comment.

More Answers (1)

Nicolas Schmit
Nicolas Schmit on 26 Jan 2018

Categories

Find more on Graphics Object Programming in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!