Problem with an equation
Mostrar comentarios más antiguos
Hi!
I have a problem writing an equation in Matlab. The variables and the equation look like this:
x=(-3:0.001:3)
y=(-4:0.001:4)
z=cos(x*y)*(1+3*(exp-(x.^2+2*y.^2)))
For me one of the obvious problems is that x and y have different sizes. But surely there is a way around the problem.
The message I recieve is:
Error using * Inner matrix dimensions must agree.
So obviously something is also wrong with the dimensions but I can´t figure it out.
So my question is, how do I write this to make this equation work?
A brief explanation of why this is not working would also be appreciated!
Thank you in advance.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Spline Postprocessing en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!