How would I get the Heaviside function to be period in my solution?What is the opposite of logarithmic...

Can a druid choose the size of its wild shape beast?

What do Xenomorphs eat in the Alien series?

Why doesn't using two cd commands in bash script execute the second command?

Can I use USB data pins as power source

Is there a data structure that only stores hash codes and not the actual objects?

Official degrees of earth’s rotation per day

What did Alexander Pope mean by "Expletives their feeble Aid do join"?

Credit cards used everywhere in Singapore or Malaysia?

Does Mathematica reuse previous computations?

Why did it take so long to abandon sail after steamships were demonstrated?

Does someone need to be connected to my network to sniff HTTP requests?

how to draw discrete time diagram in tikz

What's the meaning of “spike” in the context of “adrenaline spike”?

Have researchers managed to "reverse time"? If so, what does that mean for physics?

Life insurance that covers only simultaneous/dual deaths

Dice rolling probability game

Awsome yet unlucky path traversal

how to write formula in word in latex

Welcoming 2019 Pi day: How to draw the letter π?

Happy pi day, everyone!

What approach do we need to follow for projects without a test environment?

Min function accepting varying number of arguments in C++17

How do I hide Chekhov's Gun?

Combining an idiom with a metonymy



How would I get the Heaviside function to be period in my solution?


What is the opposite of logarithmic scale?Laplace Heaviside function,how can I continue?Histogram of three uneven datasetsAnalytic solution of the equation $cint_0^t x^{a-1}e^{-x}dx + (c+e^t)e^{-t}t^{a-1} = 0$Control Theory: How to model input u(t) that has a binary switch?What's the difference between these two methods to get the initial value Laplace problem equal to zero?Estimating a derivative of a linear data series using a parabolic fitWhat's this equation?What is the correct way to convert between linear-linear and log-log plots?Laplace transform of heat conduction PDE in cylindrical coordinates.













0












$begingroup$


so I am trying to solve an RC circuit problem that represents the square wave. Which I have already done on paper and now I am trying to plot it. So for this problem, we solved it using two methods, one using a Fourier series and another using the Laplace transformation method. When I solved for this method I got the following equation:



$$ e^{-tover CR} bigg( e^{Tover CR} Theta(t-T) - e^{Tover 2CR} Thetabig(t-frac{T}{2}big) + i_0 *Rbigg ) over R$$



Where $Theta$ is the Heaviside function and is periodic about $T$ and $i_0 = frac{e^{Tover 2CR}}{(1+e^{Tover 2CR})R} $



My problem is that when I try to plot this I only know of one way to plot that and it doesn't give me a periodic plot. So what I am wondering is how would you implement this?



This is currently the chunk of code I am working with:



time = np.linspace(0,5e-3,100000)
i0 = (np.exp(T/(2*C*R)))/((1+np.exp(T/(2*C*R)))*R)
I = (np.exp(-time/(C*R))*(np.exp(T/(C*R))*np.heaviside(time-T,1) - np.exp(T/(2*C*R))*np.heaviside(time-T/2,1)+ i0*R))/R
plt.plot(time,I)


This is being done in python and the libraries I have imported are:




  • matplotlib.pyplot

  • numpy

  • math


My thoughts were possibly having my variable I be a nested list or maybe a matrix, and then insert loop over a variable n (which would be inside the Heaviside function to get the periodicity) but I wasn't sure if this would be an ideal way to do this. Any assistance would be greatly appreciated.



EDIT #1: So what I did was this



i0 = (np.exp(T/(2*C*R)))/((1+np.exp(T/(2*C*R)))*R)
I = []
for n in range(1,6):

i = (np.exp(-time/(C*R))*(np.exp(T/(C*R))*np.heaviside(time-n*T,1) - np.exp(T/(2*C*R))*np.heaviside(time-n*T/2,1)+ i0*R))/R
I = np.concatenate((I,i),axis=None)


This gave me something similar to what I was expecting but I am not sure if there would be a better way to do this.










share|cite|improve this question











$endgroup$

















    0












    $begingroup$


    so I am trying to solve an RC circuit problem that represents the square wave. Which I have already done on paper and now I am trying to plot it. So for this problem, we solved it using two methods, one using a Fourier series and another using the Laplace transformation method. When I solved for this method I got the following equation:



    $$ e^{-tover CR} bigg( e^{Tover CR} Theta(t-T) - e^{Tover 2CR} Thetabig(t-frac{T}{2}big) + i_0 *Rbigg ) over R$$



    Where $Theta$ is the Heaviside function and is periodic about $T$ and $i_0 = frac{e^{Tover 2CR}}{(1+e^{Tover 2CR})R} $



    My problem is that when I try to plot this I only know of one way to plot that and it doesn't give me a periodic plot. So what I am wondering is how would you implement this?



    This is currently the chunk of code I am working with:



    time = np.linspace(0,5e-3,100000)
    i0 = (np.exp(T/(2*C*R)))/((1+np.exp(T/(2*C*R)))*R)
    I = (np.exp(-time/(C*R))*(np.exp(T/(C*R))*np.heaviside(time-T,1) - np.exp(T/(2*C*R))*np.heaviside(time-T/2,1)+ i0*R))/R
    plt.plot(time,I)


    This is being done in python and the libraries I have imported are:




    • matplotlib.pyplot

    • numpy

    • math


    My thoughts were possibly having my variable I be a nested list or maybe a matrix, and then insert loop over a variable n (which would be inside the Heaviside function to get the periodicity) but I wasn't sure if this would be an ideal way to do this. Any assistance would be greatly appreciated.



    EDIT #1: So what I did was this



    i0 = (np.exp(T/(2*C*R)))/((1+np.exp(T/(2*C*R)))*R)
    I = []
    for n in range(1,6):

    i = (np.exp(-time/(C*R))*(np.exp(T/(C*R))*np.heaviside(time-n*T,1) - np.exp(T/(2*C*R))*np.heaviside(time-n*T/2,1)+ i0*R))/R
    I = np.concatenate((I,i),axis=None)


    This gave me something similar to what I was expecting but I am not sure if there would be a better way to do this.










    share|cite|improve this question











    $endgroup$















      0












      0








      0





      $begingroup$


      so I am trying to solve an RC circuit problem that represents the square wave. Which I have already done on paper and now I am trying to plot it. So for this problem, we solved it using two methods, one using a Fourier series and another using the Laplace transformation method. When I solved for this method I got the following equation:



      $$ e^{-tover CR} bigg( e^{Tover CR} Theta(t-T) - e^{Tover 2CR} Thetabig(t-frac{T}{2}big) + i_0 *Rbigg ) over R$$



      Where $Theta$ is the Heaviside function and is periodic about $T$ and $i_0 = frac{e^{Tover 2CR}}{(1+e^{Tover 2CR})R} $



      My problem is that when I try to plot this I only know of one way to plot that and it doesn't give me a periodic plot. So what I am wondering is how would you implement this?



      This is currently the chunk of code I am working with:



      time = np.linspace(0,5e-3,100000)
      i0 = (np.exp(T/(2*C*R)))/((1+np.exp(T/(2*C*R)))*R)
      I = (np.exp(-time/(C*R))*(np.exp(T/(C*R))*np.heaviside(time-T,1) - np.exp(T/(2*C*R))*np.heaviside(time-T/2,1)+ i0*R))/R
      plt.plot(time,I)


      This is being done in python and the libraries I have imported are:




      • matplotlib.pyplot

      • numpy

      • math


      My thoughts were possibly having my variable I be a nested list or maybe a matrix, and then insert loop over a variable n (which would be inside the Heaviside function to get the periodicity) but I wasn't sure if this would be an ideal way to do this. Any assistance would be greatly appreciated.



      EDIT #1: So what I did was this



      i0 = (np.exp(T/(2*C*R)))/((1+np.exp(T/(2*C*R)))*R)
      I = []
      for n in range(1,6):

      i = (np.exp(-time/(C*R))*(np.exp(T/(C*R))*np.heaviside(time-n*T,1) - np.exp(T/(2*C*R))*np.heaviside(time-n*T/2,1)+ i0*R))/R
      I = np.concatenate((I,i),axis=None)


      This gave me something similar to what I was expecting but I am not sure if there would be a better way to do this.










      share|cite|improve this question











      $endgroup$




      so I am trying to solve an RC circuit problem that represents the square wave. Which I have already done on paper and now I am trying to plot it. So for this problem, we solved it using two methods, one using a Fourier series and another using the Laplace transformation method. When I solved for this method I got the following equation:



      $$ e^{-tover CR} bigg( e^{Tover CR} Theta(t-T) - e^{Tover 2CR} Thetabig(t-frac{T}{2}big) + i_0 *Rbigg ) over R$$



      Where $Theta$ is the Heaviside function and is periodic about $T$ and $i_0 = frac{e^{Tover 2CR}}{(1+e^{Tover 2CR})R} $



      My problem is that when I try to plot this I only know of one way to plot that and it doesn't give me a periodic plot. So what I am wondering is how would you implement this?



      This is currently the chunk of code I am working with:



      time = np.linspace(0,5e-3,100000)
      i0 = (np.exp(T/(2*C*R)))/((1+np.exp(T/(2*C*R)))*R)
      I = (np.exp(-time/(C*R))*(np.exp(T/(C*R))*np.heaviside(time-T,1) - np.exp(T/(2*C*R))*np.heaviside(time-T/2,1)+ i0*R))/R
      plt.plot(time,I)


      This is being done in python and the libraries I have imported are:




      • matplotlib.pyplot

      • numpy

      • math


      My thoughts were possibly having my variable I be a nested list or maybe a matrix, and then insert loop over a variable n (which would be inside the Heaviside function to get the periodicity) but I wasn't sure if this would be an ideal way to do this. Any assistance would be greatly appreciated.



      EDIT #1: So what I did was this



      i0 = (np.exp(T/(2*C*R)))/((1+np.exp(T/(2*C*R)))*R)
      I = []
      for n in range(1,6):

      i = (np.exp(-time/(C*R))*(np.exp(T/(C*R))*np.heaviside(time-n*T,1) - np.exp(T/(2*C*R))*np.heaviside(time-n*T/2,1)+ i0*R))/R
      I = np.concatenate((I,i),axis=None)


      This gave me something similar to what I was expecting but I am not sure if there would be a better way to do this.







      graphing-functions laplace-transform python






      share|cite|improve this question















      share|cite|improve this question













      share|cite|improve this question




      share|cite|improve this question








      edited Mar 10 at 23:25







      Robert

















      asked Mar 10 at 22:32









      RobertRobert

      16212




      16212






















          0






          active

          oldest

          votes











          Your Answer





          StackExchange.ifUsing("editor", function () {
          return StackExchange.using("mathjaxEditing", function () {
          StackExchange.MarkdownEditor.creationCallbacks.add(function (editor, postfix) {
          StackExchange.mathjaxEditing.prepareWmdForMathJax(editor, postfix, [["$", "$"], ["\\(","\\)"]]);
          });
          });
          }, "mathjax-editing");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "69"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          noCode: true, onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3143002%2fhow-would-i-get-the-heaviside-function-to-be-period-in-my-solution%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Mathematics Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          Use MathJax to format equations. MathJax reference.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3143002%2fhow-would-i-get-the-heaviside-function-to-be-period-in-my-solution%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Nidaros erkebispedøme

          Birsay

          Was Woodrow Wilson really a Liberal?Was World War I a war of liberals against authoritarians?Founding Fathers...