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

thanks!!
As always, my pleasure!

Sign in to comment.

Categories

Find more on Get Started with MATLAB 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!