Unable to perform assignment
古いコメントを表示
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
2020 年 10 月 8 日
How does the code initialize the est variables?
VINAY VERAMAREDDY
2020 年 10 月 8 日
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 についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!