z=xy
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
[x,y]=meshgrid(-6:1:6)
z=x*y
Is not giving the function z=x*y, anybody come across this issues pls?
0 Kommentare
Akzeptierte Antwort
Sean de Wolski
am 22 Jun. 2011
perhaps you means an element-wise multiplication?
z = x.*y;
what you're doing above is a matrix multiplication from linear algebra.
Weitere Antworten (1)
Laura Proctor
am 22 Jun. 2011
Or, you could use matrix multiplication with vectors:
x = -6:6;
z = x'*x
0 Kommentare
Siehe auch
Kategorien
Mehr zu Resizing and Reshaping Matrices finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!