HowTo Cross-correlate in GNU Octave

Поделиться
HTML-код
  • Опубликовано: 27 дек 2024

Комментарии • 8

  • @nathanlewis42
    @nathanlewis42 4 года назад +7

    You deserve more subscribers.

  • @jaydeepshah2026
    @jaydeepshah2026 2 года назад +1

    Very useful video sir....

  • @barismetin1014
    @barismetin1014 3 года назад

    Very useful video thank you

  • @barismetin1014
    @barismetin1014 3 года назад

    clear all;
    close all;
    clc;
    N= 10;
    x= zeros(100,1);
    x(1:N)=1;
    figure
    plot(x)
    xlabel("AAmplitue")
    ylabel("Samples")
    grid on
    shift=12;
    y=zeros(100,1);
    y(shift+1:shift+N) =1;
    figure
    subplot(2,1,1)
    plot(x)
    xlabel("Samples")
    ylabel("Amplitude")
    grid on
    title("Orginal Signal")
    subplot(2,1,2)
    plot(y)
    xlabel("Samples")
    ylabel("Amplitude")
    title("Shifted")
    grid on
    pkg load signal
    [rxy,legs]=xcorr(y,x);
    figure
    subplot(3,1,1)
    plot(x)
    xlabel("Samples")
    ylabel("Amplitude")
    grid on
    title("Orginal Signal")
    subplot(3,1,2)
    plot(y)
    xlabel("Samples")
    ylabel("Amplitude")
    title("Shifted")
    subplot(3,1,3)
    plot(legs, rxy)
    xlabel("legs")
    ylabel("rxy")
    grid on

  • @hawkkim1974
    @hawkkim1974 3 года назад +1

    very nice!

  • @franciscomiranda3239
    @franciscomiranda3239 3 года назад

    Source Code???

    • @barismetin1014
      @barismetin1014 3 года назад +1

      clear all;
      close all;
      clc;
      N= 10;
      x= zeros(100,1);
      x(1:N)=1;
      figure
      plot(x)
      xlabel("AAmplitue")
      ylabel("Samples")
      grid on
      shift=12;
      y=zeros(100,1);
      y(shift+1:shift+N) =1;
      figure
      subplot(2,1,1)
      plot(x)
      xlabel("Samples")
      ylabel("Amplitude")
      grid on
      title("Orginal Signal")
      subplot(2,1,2)
      plot(y)
      xlabel("Samples")
      ylabel("Amplitude")
      title("Shifted")
      grid on
      pkg load signal
      [rxy,legs]=xcorr(y,x);
      figure
      subplot(3,1,1)
      plot(x)
      xlabel("Samples")
      ylabel("Amplitude")
      grid on
      title("Orginal Signal")
      subplot(3,1,2)
      plot(y)
      xlabel("Samples")
      ylabel("Amplitude")
      title("Shifted")
      subplot(3,1,3)
      plot(legs, rxy)
      xlabel("legs")
      ylabel("rxy")
      grid on