I have x of size (15*1) and y of size (14*1) and Z of size (14*1*15). I want to plot x with z at each y?
조회 수: 1 (최근 30일)
이전 댓글 표시
I have x of size (15*1) and y of size (14*1) and Z of size (14*1*15). I want to plot x with z at each y?
댓글 수: 0
채택된 답변
Star Strider
2023년 7월 10일
I am not certain what you want to do.
This will plot ‘Z’ at each ‘x’ and ‘y’. It may be necessary for you to use the squeeze functiion on ‘Z’ to remove the singleton dimension first.
Try something like this —
x = (1:15).';
y = (1:14).';
Z = randn(14,15)*2 + y*x.';
figure
surf(x, y, Z)
xlabel('X')
ylabel('Y')
zlabel('Z')
.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Annotations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!