Problem with an equation
Mostra commenti meno recenti
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.
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su Spline Postprocessing in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!