Example on Time shifting

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

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

  • @arpitsrivastav9609
    @arpitsrivastav9609 4 года назад +1

    You have done a good job, Very easily you have explained it. Very well Done buddy Keep up the good work and Keep Educating people. Best Wishes

  • @pi.lu_
    @pi.lu_ Год назад

    function in MATLAB that will take a sequence x[n], and shift it to the left or to the right by a given number of samples. use the function written to find the sum of the results obtained by shifting x[n] to the right by 2 samples and and obtained by shifting x[n] to the left by 2 samples. kindly provide the codes🙏

  • @m.shaheersiddiqui7669
    @m.shaheersiddiqui7669 3 года назад

    Sir If I have the signal like y(n)=x(n-5)-x(n+2) what will be the code

  • @gambu4810
    @gambu4810 4 года назад

    Hi knowledge. Thank you for the informative video. Can you show how to make an animation of a time shift?

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

    Bro I want to do shifting by getting input from user

  • @werewolfwaghela752
    @werewolfwaghela752 4 года назад +1

    How to add the original and the shifted signal

    • @KnowledgeAmplifier1
      @KnowledgeAmplifier1  4 года назад

      Check this video please-->Signal addition in MATALB
      ruclips.net/video/cHb8Gsk2fFQ/видео.html
      Now if you have the original signal and shifted one , you can add simply :-)
      For example , in the above case , if you want to add , the code will be like this-->
      n1=0:4;
      x=[0 1 2 3 3];
      n2=n1-2;
      y=x;
      u=min(min(n1),min(n2));
      t=max(max(n1),max(n2));
      r=u:1:t;
      z1=[];
      temp=1;
      for i=1:length(r)
      if(r(i)max(n1))
      z1=[z1 0];
      else
      z1=[z1 x(temp)];
      temp=temp+1;
      end
      end
      z2=[];
      temp=1;
      for i=1:length(r)
      if(r(i)max(n2))
      z2=[z2 0];
      else
      z2=[z2 y(temp)];
      temp=temp+1;
      end
      end
      z=z1+z2;
      subplot(3,1,1);
      stem(r,z1);
      subplot(3,1,2);
      stem(r,z2);
      subplot(3,1,3);
      stem(r,z);

    • @werewolfwaghela752
      @werewolfwaghela752 4 года назад

      Just can u just tell me the code for
      U(n)+u(n-1) .

    • @werewolfwaghela752
      @werewolfwaghela752 4 года назад

      @@KnowledgeAmplifier1 plzz help

    • @KnowledgeAmplifier1
      @KnowledgeAmplifier1  4 года назад

      @@werewolfwaghela752 This is the code-->
      n1=-4:4;
      x=(n1>=0);
      n2=n1+1;
      y=x;
      u=min(min(n1),min(n2));
      t=max(max(n1),max(n2));
      r=u:1:t;
      z1=[];
      temp=1;
      for i=1:length(r)
      if(r(i)max(n1))
      z1=[z1 0];
      else
      z1=[z1 x(temp)];
      temp=temp+1;
      end
      end
      z2=[];
      temp=1;
      for i=1:length(r)
      if(r(i)max(n2))
      z2=[z2 0];
      else
      z2=[z2 y(temp)];
      temp=temp+1;
      end
      end
      z=z1+z2;
      subplot(3,1,1);
      stem(r,z1);
      subplot(3,1,2);
      stem(r,z2);
      subplot(3,1,3);
      stem(r,z);

    • @werewolfwaghela752
      @werewolfwaghela752 4 года назад

      @@KnowledgeAmplifier1 thanks 😁

  • @ninaddevdas6953
    @ninaddevdas6953 4 года назад

    sorry to say but it is wrong N+2 means advancing the signal which means the signal should move to the opposite side as shown in your video

    • @KnowledgeAmplifier1
      @KnowledgeAmplifier1  4 года назад

      I have explained in the video as N+2 but later I have shown the reverse case too , so for that I have used n-2 , watch the whole video please and then comment :-)

    • @ninaddevdas6953
      @ninaddevdas6953 4 года назад

      N-2 means delaying the signal in which the signal should move towards the positive axis But it is opposite in your video

    • @ninaddevdas6953
      @ninaddevdas6953 4 года назад

      you can take Signal and System by nagoor kani as reference

    • @KnowledgeAmplifier1
      @KnowledgeAmplifier1  4 года назад

      @@ninaddevdas6953 please watch the figure at 3:56 , I have done that ony , N-2 means delaying the signal , which means signal should move towards the positive axis , to timplement that in MATLAB , you have to write m=n+2

    • @KnowledgeAmplifier1
      @KnowledgeAmplifier1  4 года назад

      @@ninaddevdas6953 ya , you check the figure at 3:56 and verify whether it is correct or not

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

    n-2 means advance and n+2 means delay..

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

      No the reverse one correct , check the theory properly
      ruclips.net/video/gMYNwG_aWxQ/видео.html
      Don't get confused :-)

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

    It is wrong