z=xy
조회 수: 2 (최근 30일)
이전 댓글 표시
[x,y]=meshgrid(-6:1:6)
z=x*y
Is not giving the function z=x*y, anybody come across this issues pls?
댓글 수: 0
채택된 답변
Sean de Wolski
2011년 6월 22일
perhaps you means an element-wise multiplication?
z = x.*y;
what you're doing above is a matrix multiplication from linear algebra.
추가 답변 (1개)
Laura Proctor
2011년 6월 22일
Or, you could use matrix multiplication with vectors:
x = -6:6;
z = x'*x
댓글 수: 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!