Hi, How can i implement a function with 2 independent variables?

I have attached the desired output image as well. I'm using imagesc and image but it didn't work for me.

 Accepted Answer

3 Comments

[R,theta]=ndgrid(0:1000,0:100);
B1=zeros(length(R),length(theta));
for m=0:M-1
B=exp(1i*2*pi*log(m+1)*delta*(t-((R-RT)/c)))*(exp(1i*2*pi*f0*m*d*(sin(theta)-sin(thetaT))/c))';
B1=B+B1;
end
B_norm=abs(B1);
F=griddedInterpolant(R,theta,B_norm);
I am trying to implement my function now but it's giving me this error. Can you please help what's the problem now? Error using griddedInterpolant The grid vectors do not define a grid of points that match the given values.
What is it deltas, RT, f0, d, thetaT, c - scalars or matrices, their sizes?
In your case R, theta - arrays [1001 x 101], but B1 - [1001 x 1001].

Sign in to comment.

More Answers (0)

Categories

Community Treasure Hunt

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

Start Hunting!