DOAest1=asin(sort(-angle(rx(ad([1])))/pi))*180/pi
DOAest2=asin(sort(-angle(rx(ad([3])))/pi))*180/pi
DOAest3=asin(sort(-angle(rx(ad([5])))/pi))*180/pi
est1=[est1 DOAest1];
est2=[est2 DOAest2];
est3=[est3 DOAest3];
est=[est1 est2 est3];
DOAest_RM(1:iwave,i) = sort(est)' Unable to perform assignment because the size of the left side is 3-by-1 and the size of the right side is 6-by-1.

댓글 수: 3

Walter Roberson
Walter Roberson 2020년 10월 8일
How does the code initialize the est variables?
VINAY VERAMAREDDY
VINAY VERAMAREDDY 2020년 10월 8일
I have just initialized est ahead,
est[]
est1[]
est2[]
est3[]
Walter Roberson
Walter Roberson 2020년 10월 8일
Is rx a function that is returning a vector? Or is ad a function that is returning a vector? You must be expecting a non-scalar result from angle() as otherwise you would not bother to sort() what it returns.
Anyhow, you will find that your DOAest* variables are all vectors of length 2.
Or, alternately, in code you did not show here, the code you posted is being executed twice and DOAest* variables are all scalars.
By the time you get to the sort(est) call, est is a vector with 6 elements, but iwave is value 3 so you are trying to assign the 6 values into 3 locations.

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

답변 (0개)

카테고리

도움말 센터File Exchange에서 NaNs에 대해 자세히 알아보기

질문:

2020년 10월 8일

댓글:

2020년 10월 8일

Community Treasure Hunt

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

Start Hunting!

Translated by