
2d function in 3d
2 次查看(过去 30 天)
显示 更早的评论
i need to show this function y = x^2 in 3d in matlab

0 个评论
采纳的回答
Star Strider
2018-1-26
编辑:Star Strider
2018-1-26
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.
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Startup and Shutdown 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!