Why do I get different results with row or column vectors when using the

C
Charlottemia · Mar 22, 2021 · 2.3K views
Question
Why do I get different results with row or column vectors when using the ROOTEIG or ROOTMUSIC functions in MATLAB 7.5 (R2007b) ? When I execute the ROOTEIG or ROOTMUSIC functions in MATLAB, I get different results with row or column vectors.  
Expert Answer
Profile picture of Kshitij Singh
Kshitij Singh PhD Expert
Answered Aug 13, 2026
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.
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!