Why do I get different results with row or column vectors when using the ROOTEIG or ROOTMUSIC functions in MATLAB 7.5 (R2007b) ?
1 view (last 30 days)
Show older comments
When I execute the ROOTEIG or ROOTMUSIC functions in MATLAB, I get different results with row or column vectors.
Accepted Answer
MathWorks Support Team
on 27 Jun 2009
The ' (apostrophe) is the conjugate transpose operator. What is needed for these two functions to give equal results when using row or column vectors is the array transpose operator: .'
Reproduction steps:
fs = 12;
f0 = 2;
t = ((1:1024)' - 1)/fs;
x = exp(j*2*pi*f0*t) + .1*randn(1024, 1);
% These lines give different results.
fe = rooteig(x, 1, fs)
fe1 = rooteig(x.', 1, fs) % Same result as before.
fe2 = rooteig(x', 1, fs) % Different result as before.
% These lines give different results.
fm = rootmusic(x, 1, fs)
fm1 = rootmusic(x.', 1, fs) % Same result as before.
fm2 = rootmusic(x', 1, fs) % Different result as before.
0 Comments
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!