contour3-With 3 dimensions input arguments
조회 수: 6 (최근 30일)
이전 댓글 표시
Hello. I have the following: Α:24X24X24, B:24X24X24 and C:24X24X24
I want to make the contour3 plot
contour3(A,B,C)
but it shows me the following error: "Input arguments must have at most 2 dimensions". Is there a way to make a contour3 plot with three dimensions?
댓글 수: 0
답변 (2개)
John D'Errico
2022년 1월 10일
In order for a 3-d contour plot to make sense, you need to have some function, W(X,Y,Z), thuis a level surface, where you look for constant values of W as 3-d surfaces.
If all you have are A, B, and C, then a 3-d contour plot makes little sense.
If you actually have a 4th variable, you can use isosurface.
help isosurface
I'm not sure what you intend to see from contour3 given what you have.
댓글 수: 0
Bjorn Gustavsson
2022년 1월 10일
Maybe you get what you need with the slice function, or perhaps isosurface. From my naive understanding we can draw iso-contours on a 2-D surface - and the extension of such iso-contours in 3-D becomes iso-surfaces. If you want one set of contours on each level in the z-direction you might get use of the attached function.
HTH
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!