Recent content by daymos

  1. D

    MATLAB Matlab - calculate phase shift using fft

    the original 2 signals had no DC component. But by multiplying them value by value the resulting signal was no longer centered on the zero for the vertical axis. Pretty obvious after you get it..
  2. D

    MATLAB Matlab - calculate phase shift using fft

    well, ok that's correct. Since I need the 100Hz I subtracted the mean value of the signal to itself. thanks a lot!
  3. D

    MATLAB Matlab - calculate phase shift using fft

    when I use max function it gives back the index of frequency = 0 HZ
  4. D

    MATLAB Matlab - calculate phase shift using fft

    thanks for the spectrum plot tips jedishrfu I haven't solved it yes but I think you pointed me in the right direction. this is the spectrum of the 3 signals: So there is a huge spike at zero Hz. I have composed each signal multiplying 2 previous signals that where at 50Hz. So I expect the...
  5. D

    MATLAB Matlab - calculate phase shift using fft

    yes that is what it does. Also my own code did that. ffts are mostly zero with one big spike on 50 Hz. I am positive both my own code and the one I posted are correct. becaouse I have used them many times and they returned correct results
  6. D

    MATLAB Matlab - calculate phase shift using fft

    I have found a different way to calculate phase shift that can be used in this case: h1 = hilbert(vPa); h2 = hilbert(vPb); phase_rad = max(angle(h1 ./ h2)) which gives back the correct value of 2/3 * pi. However I would be couriois to know why for this specific case fft didnt work. I...
  7. D

    MATLAB Matlab - calculate phase shift using fft

    I have now, angle(Y(indy)) and angle(X(indx)) are both zero. I have attached the original 3 vectors.
  8. D

    MATLAB Matlab - calculate phase shift using fft

    hello, I have 3 signals in the form of sampled values. When I plot them using plot (t,vPa,t,vPb,t,vPc) where vPa, vPb, vPc contains the values and t contains the sampling istants I get this: when I calculate phase shift using fft I get phase angle = 0. I have tried using my own code ( which...
Back
Top