フィルターのクリア

Why this code gives error on line 47?

3 ビュー (過去 30 日間)
Sadiq Akbar
Sadiq Akbar 2022 年 12 月 29 日
コメント済み: Image Analyst 2022 年 12 月 30 日
I downloaded the code attached from the following URL of Mathworks site:
When I run it, it gives the folloing error which I don't know why?
Unrecognized function or variable 'vec'.
Error in EPUMA>pumaUpdate (line 47)
f = -vec(U(L+1:end,:));
Error in EPUMA (line 26)
DOA_Cand = pumaUpdate(U, S, L, K, maxIter);
Error in demo (line 25)
doa_estimates = EPUMA(x, K);
  7 件のコメント
Torsten
Torsten 2022 年 12 月 30 日
Star Strider
Star Strider 2022 年 12 月 30 日
Thanks.
I discovered that in my search, however I wasn’t certain it was the correct function. since I had no idea what the result was supposed to be.
In any event, a version of it should have been included in the ‘EPUMA’ function files.

サインインしてコメントする。

採用された回答

Image Analyst
Image Analyst 2022 年 12 月 30 日
Try this:
f = -U(L + 1 : end, :); % Extract rows (L+1) downwards, and all columns. f will be a 2-D matrix.
% Turn this 2-D matrix f into a column vector.
% Stack columns underneath each other, like [col1; col2; col3; col4; last column]
f = f(:);
  7 件のコメント
Sadiq Akbar
Sadiq Akbar 2022 年 12 月 30 日
@Image Analyst I always accept the answer when I get satisfied. Actually I didn't know about the vote till date. However now it is known to me but the option is not available, therefore cannot do it though I would like to do it. However, thanks to all of you oncd again.
Image Analyst
Image Analyst 2022 年 12 月 30 日
The vote capability is for other users to say that an answer is good. Sometimes original posters just accept the first one blindly. Sometimes just because it's the first one on the list and they think they can accept multiple answers (if there were multiple ones that were right). Or sometimes they accepted too quickly (like as soon as they got the very first answer) and another one comes along shortly afterwards. They can Unaccept and accept the better one, but few people bother to do that. So the votes are for the community to say which one they think is really the best answer. Or sometimes, not the absolute best answer but just a very good answer that they think the Answerer should get credit for in terms of Reputation Points. Mathworks can extend certain perks to high earning Answerers (privileges, swag mechandise, etc.) so that's why people like to earn points.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeResizing and Reshaping Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by