I want to implement these equations in MATLAB but how?

1 visualización (últimos 30 días)
Sadiq Akbar
Sadiq Akbar el 14 de Oct. de 2021
Comentada: Sadiq Akbar el 14 de Oct. de 2021
The equations are given in the attachment. Assume lambda=1. How to implement the given equations in MATLAB?
  2 comentarios
Sadiq Akbar
Sadiq Akbar el 14 de Oct. de 2021
Thanks for your response. It is symbol of Kronecker product

Iniciar sesión para comentar.

Respuesta aceptada

Matt J
Matt J el 14 de Oct. de 2021
Editada: Matt J el 14 de Oct. de 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 comentarios
Matt J
Matt J el 14 de Oct. de 2021
No, the Kronecker product of two vectors is a vector, e.g.,
a=[1;2;3];
b=[4;5];
kron(a,b)
ans = 6×1
4 5 8 10 12 15
Sadiq Akbar
Sadiq Akbar el 14 de Oct. de 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

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Condensed Matter & Materials Physics en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by