sir,need your valuable suggestion .how to implement comlex equations in matlab such as below.your suggestion wil be priceless to me .

 Akzeptierte Antwort

x=-5:0.001:5;
y=-5:0.001:5;
rox=0.2;
roy=0.4;
u=1;
h=(1/(2*pi*rox*roy)).*exp(-(1/2)*((x.^2/rox^2)+(y.^2/roy^2))).*cos(2*pi*u.x);

5 Kommentare

sir ,can you tell me the fundementals of how to implement those type of questions.
The above code will generate a vector result, rather than a matrix result. It would be better to use meshgrid or ndgrid or bsxfun.
X = -5:0.001:5;
Y = -5:0.001:5;
rox = 0.2;
roy = 0.4;
u = 1;
[x, y] = ndgrid(X, Y);
h = (1/(2*pi*rox*roy)) .* exp(-(1/2)*((x.^2/rox^2) + (y.^2/roy^2))) .* cos(2*pi*u*x);
when i start using your code ..the above stated..i am getting this error sir ..what shall i do now ?
</matlabcentral/answers/uploaded_files/7654/error.JPG> when i start using your code ..the above stated..i am getting this error sir ..what shall i do now ?

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Community Treasure Hunt

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

Start Hunting!

Translated by