Problem with an equation
古いコメントを表示
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.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Spline Postprocessing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!