I want to implement these equations in MATLAB but how?

1 view (last 30 days)
Sadiq Akbar
Sadiq Akbar on 14 Oct 2021
Commented: Sadiq Akbar on 14 Oct 2021
The equations are given in the attachment. Assume lambda=1. How to implement the given equations in MATLAB?

Accepted Answer

Matt J
Matt J on 14 Oct 2021
Edited: Matt J on 14 Oct 2021
fn=@(theta,k) exp((0:k-1).' * (2i*pi*d/lambda*sin(theta)));
A=fn(theta,M);
B=fn(theta,N);
y=reshape( A*B.', [],1);
  7 Comments
Sadiq Akbar
Sadiq Akbar on 14 Oct 2021
I made changes to yours as:
theta=[10 20 30];
M=10;
N=4;
K=3;
lambda=1;
d=0.5;
fn=@(theta,k) exp((0:k-1).' * (2i*pi*d/lambda*sin(theta)));
A=fn(theta,0:M-1);
B=fn(theta,0:N-1);
But now it gives A and B as empty matrices

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!