[x,y]=meshgrid(-6:1:6)
z=x*y
Is not giving the function z=x*y, anybody come across this issues pls?

 Respuesta aceptada

Sean de Wolski
Sean de Wolski el 22 de Jun. de 2011

1 voto

perhaps you means an element-wise multiplication?
z = x.*y;
what you're doing above is a matrix multiplication from linear algebra.

1 comentario

petros
petros el 22 de Jun. de 2011
my bad, ya it works thnx! :)

Iniciar sesión para comentar.

Más respuestas (1)

Laura Proctor
Laura Proctor el 22 de Jun. de 2011

2 votos

Or, you could use matrix multiplication with vectors:
x = -6:6;
z = x'*x

Etiquetas

Preguntada:

el 22 de Jun. de 2011

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by