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 で Resizing and Reshaping Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!