How To Graph In Python | Infinite Square Well

Поділитися
Вставка
  • Опубліковано 14 жов 2024

КОМЕНТАРІ • 50

  • @shahtamzid
    @shahtamzid 6 років тому +29

    It should be A = (2/a)**(0.5), not 1/2 because that's treated as an integer and gives 1/2 = 0, hence your plot reached a max value of 1, not A, which would be sqrt(2/a) = sqrt(1/pi) = 0.5642...

    • @AndrewDotsonvideos
      @AndrewDotsonvideos  6 років тому +9

      Wow thanks for the good catch. Pinning this comment

    • @NickKartha
      @NickKartha 5 років тому +5

      1/2 is treated as float in python 3.x -- this is a python 2.x specific issue.
      And fixing it is easy too ``` >> from __future__ import division ```
      edit: it's a double underscore (darn, formatting)

  • @MagicMoMos
    @MagicMoMos 6 років тому +2

    Just started my first physics research/internship today and went straight to this for help. Just wanted to say thanks!!

  • @sfruizmiranda
    @sfruizmiranda 6 років тому +11

    Hey man, i just wanted you to know that I love your videos. I am a high school student and I want to major in physics and your videos have provided so much guidance and I don't feel insecure about it anymore :)

    • @matthewcrespo1442
      @matthewcrespo1442 6 років тому

      sfruizmiranda yep same here

    • @cheeseburgerdude007
      @cheeseburgerdude007 6 років тому

      sfruizmiranda thats great to hear! im in a similar boat! my high school pushes engineering very much but personally the conceptual parts of physics always interested me a little more. after watching andrew i became much more confident in my interest towards physics and its been great!

    • @AndrewDotsonvideos
      @AndrewDotsonvideos  6 років тому

      These comments mean a lot! Really glad to know some people enjoy these videos.

    • @matthewcrespo1442
      @matthewcrespo1442 6 років тому

      Alex Arteaga are you taking physics this year

    • @matthewcrespo1442
      @matthewcrespo1442 6 років тому

      Andrew Dotson YEA I just started wacthing your vids and they've really help me get a better picture as to what I'm going to major in because at first I was thinking about math but now physics really looks amazing.

  • @KUNALKUMAR-mi7pt
    @KUNALKUMAR-mi7pt 5 років тому

    I am Kunal and i have got a project to draw graph of a particle in a 1 dimensional box . Your vidieo has been very helpful in my project . Thankyou for making this vidieo.

  • @simonthor7593
    @simonthor7593 6 років тому +2

    Great video! I am currently graphing a bit in python so this was really helpful!

  • @ThePrimevalVoid
    @ThePrimevalVoid 6 років тому +12

    Have you considered using Jupyter or SpyDer? It makes this process waaaay easier.

  • @koushikdas9564
    @koushikdas9564 3 роки тому

    Really Helpful sir
    Form India 🇮🇳

  • @arifsarkar7328
    @arifsarkar7328 4 роки тому

    I'm pursuing undergraduate degree in physics currently. This video had been very helpful for me. It'll be more helpful if you make some more like this on plotting Schrödinger's Wave function along with tunneling, bound state, regeneration of wave function and etc. Thank you.❤️

  • @KartyMcFarty
    @KartyMcFarty 6 років тому +1

    Wow this is awesome, ive had this exact question in my head for a while as im taking a computational methods class next year in python.

    • @AndrewDotsonvideos
      @AndrewDotsonvideos  6 років тому +1

      Good luck in computational! Such a fun class

    • @luc_iacob
      @luc_iacob 6 років тому +1

      Same over here, next year I'm starting with python and wanting something like this.

  • @lancediano8014
    @lancediano8014 6 років тому

    I'm so glad that python is intuitive like Matlab. Matlab and robot c++ being the only languages I've used.

  • @AngrySkyBandit
    @AngrySkyBandit 5 років тому

    This is a great video about the basics of using matplotlib! thanks

  • @noahschulz1718
    @noahschulz1718 5 років тому

    This is awesome do more of these, not lots of physics specific computational resources.

  • @alyan51
    @alyan51 6 років тому +1

    Great vid!! Could you do one on graphing a set of values from a file? As in showing the results from an experiment and fitting it with the expected model.

  • @phemelosphema1144
    @phemelosphema1144 4 роки тому

    Thank you,this was very helpful.

  • @sahaj-ps
    @sahaj-ps 4 роки тому

    Can u plz make a video on plotting of Psi for H-like atom with (r,theta,phi)

  • @davidsweeney111
    @davidsweeney111 6 років тому

    This is awesome, thanks!

  • @Salmanul_
    @Salmanul_ 3 роки тому

    now how do you show time evolution of a linear combination of them?

  • @elizabethmeghana9614
    @elizabethmeghana9614 3 роки тому

    Can u show how to use python to visualize H-atom problem !!!!!!!!!

  • @antoniosaldanio3042
    @antoniosaldanio3042 4 роки тому

    Perfect!

  • @bishalthapa3874
    @bishalthapa3874 4 роки тому

    thanks a lot

  • @LilYunjin
    @LilYunjin 4 роки тому

    Thanks.

  • @AnandaSKitchen
    @AnandaSKitchen 3 роки тому

    Im using vscode to run but error at wavefuction what can I do

  • @compphysgeek
    @compphysgeek 5 років тому

    I know it's an old video and commenting probably doesn't make much sense anymore, however, multiplying a by 1.0 to avoid integer division is a good thought but pi is a float and so is a. the 1.0 doesn't change much about it. and I hope that by now you switched to a version 3 of python. not just because the end of life for 2.7 is near but also because you don't have to worry about integer division anymore.

    • @AndrewDotsonvideos
      @AndrewDotsonvideos  5 років тому +1

      Hi,
      Yes I've changed over to 3 since then! And yeah, you're right. Since pi is already a float it wasn't necessary.

    • @iitian5904
      @iitian5904 4 роки тому

      @@AndrewDotsonvideos Can u help me bro to solve this problem few days I am worried for my project because it will decide my a lot of marks How much marks i will get in this course,which is using Variational monte carlo for 1D Square Well.(Problem 10.9 , Book Name - Nicholas J.Giardiano Computational physics ) find wave function for ground state. if you can help me or give me some ideas how can i start Python Code for this problem. it will be very helpful for me.

  • @sadaf6295
    @sadaf6295 3 роки тому

    Hey can u make Heisenberg hamiltonian in python

  • @deuce-way1440
    @deuce-way1440 4 роки тому

    My problem is that my x values are from 0-L in the potential well. How do I write that in python? L is not a number. L is equivalent to your "a" but it looks like you just chose random values.

    • @quentincastelli4150
      @quentincastelli4150 4 роки тому +1

      L = np.pi*2 #for instance you L = 2*pi
      N = 100 #number of points
      x = np.linspace(0 , L , N )
      the thing is, if you define L outside your x values, you may change it quickier, inside x AND psi, you'll just have to change it once instead of twice (might sound lazy, but pretty useful for biiiiiig expressions, so you won't mess up).
      Why did he chose 2*pi ? because you may see that at the limit in L, x = a, hence the sine in your psi = sin(n*pi) with n en integer, that means psi = 0.
      Which is prettier to end it where it began than let's say 35

  • @VanillaBean15
    @VanillaBean15 5 років тому +1

  • @jaycartwright9382
    @jaycartwright9382 6 років тому

    What's your motivation for using Python 2 rather than 3?

    • @AndrewDotsonvideos
      @AndrewDotsonvideos  6 років тому +1

      When I started my research internship last year, my mentor had me writing toy scripts to get more familiar with python, and he used 2.7. So that was the only reason really.

  • @WhatsAFuzo
    @WhatsAFuzo 5 років тому +4

    disappointed when i clicked on the video and awkwardly assumed the intro was gonna be the *clap* "wuts going on smart ppl". Lets just say i took matter into my own hands prior.

  • @negativetv2504
    @negativetv2504 6 років тому

    its fun however origin is much more straightforward

  • @chair547
    @chair547 3 роки тому

    So the reason you had to do all that annoying shit around convincing python that the numbers are actually floating point is because you're using python 2. If you upgrade to Python 3 then it'll treat the numbers as floating by default.

  • @professorpotato4861
    @professorpotato4861 6 років тому +1

    Ewwww programming