Bug in Matlab 5.0 phase.m ???

Bug in Matlab 5.0 phase.m ???

Post by Yong_Ying L » Fri, 04 Apr 1997 04:00:00



Hello

        Is this a bug in Matlab 5.0's implementation of phase.m??

??? Error using ==> +
Matrix dimensions must agree.

Error in ==> /usr/local/matlab/toolbox/ident/phase.m
On line 20  ==> PHI=PHI+2*pi*sign(DF(i))*[zeros(1,i) ones(1,N-i)];

        You can do the following step to get the above error:

1. Goto matlab/toolbox/matlab/demos
2. load gatlin2
3. X_FFT =  fft(X);
4. phase(X_FFT);

The matrix is 176x260       732160  double array (complex).
I have tested on smaller matrix and the function works fine.
Only the big matrix have this problem.

Thank You

                                                        --- YONG ---

 
 
 

Bug in Matlab 5.0 phase.m ???

Post by Pascal Gahine » Fri, 04 Apr 1997 04:00:00


The problem comes from the fact that the function PHASE expects a row
vector input, while X_FFT is a 176x260 matrix. Since fft computes the
FFT of each column of X, you need to apply PHASE to each column
of the result X_FFT:

  for col = X_FFT
    phase(col')
  end

- pascal


> Hello

>         Is this a bug in Matlab 5.0's implementation of phase.m??

> ??? Error using ==> +
> Matrix dimensions must agree.

> Error in ==> /usr/local/matlab/toolbox/ident/phase.m
> On line 20  ==> PHI=PHI+2*pi*sign(DF(i))*[zeros(1,i) ones(1,N-i)];

>         You can do the following step to get the above error:

> 1. Goto matlab/toolbox/matlab/demos
> 2. load gatlin2
> 3. X_FFT =  fft(X);
> 4. phase(X_FFT);

> The matrix is 176x260       732160  double array (complex).
> I have tested on smaller matrix and the function works fine.
> Only the big matrix have this problem.

> Thank You

>                                                         --- YONG ---


 
 
 

1. Bug in Matlab 5.0 phase.m ???

Hello

        I encountered the following message after using the phase function:

??? Error using ==> +
Matrix dimensions must agree.

Error in ==> /usr/local/matlab/toolbox/ident/phase.m
On line 20  ==> PHI=PHI+2*pi*sign(DF(i))*[zeros(1,i) ones(1,N-i)];

To recreate the above error:

goto matlab/toolbox/demos/
load gatlin2
type 'phase(fft2(X));'

What's going on???

Also, does anyone know how to implement a two-dimensional discrete cosine transform??
The dct function in MATLAB 5 only compute one-dimensional transform.

THANKS for any help!!!

                                                        --- YONG ---

2. 3000 pricing, US vs AUS comparison.

3. Bug in Matlab 5.0?

4. Amiga Hardware/Software Sale

5. Bug - PC Matlab 5.0, Exp function

6. Tesdata Systems Corp

7. bug: Mac PICT preview support dropped in Matlab 5.0

8. Modems, can 2 computers share 1

9. Phase Unwrap Bug

10. Bandpass with zero phase shift or constant phase shift within passband?

11. WANTED: Phase Plane/Phase Portrait plot routine

12. GPS/INS intgrated system

13. gps/ins INTEGRATION