
2d function in 3d
    조회 수: 3 (최근 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.
댓글 수: 2
추가 답변 (1개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


