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

 채택된 답변

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

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 ?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Call C++ from MATLAB에 대해 자세히 알아보기

태그

질문:

2014년 2월 1일

댓글:

2014년 2월 1일

Community Treasure Hunt

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

Start Hunting!

Translated by