Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
How can i graphic this function?
조회 수: 1 (최근 30일)
이전 댓글 표시
i need to graphic this function in matlab but i don't know what command i'll use, i need some references.
댓글 수: 0
답변 (2개)
Rik
2017년 11월 28일
Look into the meshgrid function to create a grid of your coordinates, make sure the syntax of your formula supports element-wise calculation (e.g. use z=x.^2+y.^2 instead of z=x^2+y^2), and use a function like surf to plot it.
If you get an error, read the documentation first. You can open the documentation by typing doc meshgrid, or you can find it by using your favorite internet search engine. Adding 'Matlab' to the name of your function in the query will usually do the trick.
댓글 수: 0
Star Strider
2017년 11월 28일
Use the cylinder function, and experiment:
[X,Y,Z] = cylinder(1-(1:-0.05:0.01).^3, 25);
figure(1)
surf(X, Y, Z)
axis equal
댓글 수: 1
Rik
2017년 11월 28일
If you need something that is not rotationaly symmetric around the origin, you will need some further processing on X,Y,Z
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!