How To Graph In Python | Infinite Square Well

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ก.ย. 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.

  • @ThePrimevalVoid
    @ThePrimevalVoid 6 ปีที่แล้ว +12

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

  • @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!

  • @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.❤️

  • @koushikdas9564
    @koushikdas9564 3 ปีที่แล้ว

    Really Helpful sir
    Form India 🇮🇳

  • @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.

  • @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.

  • @AngrySkyBandit
    @AngrySkyBandit 5 ปีที่แล้ว

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

  • @sahajpreetsingh1046
    @sahajpreetsingh1046 3 ปีที่แล้ว

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

  • @phemelosphema1144
    @phemelosphema1144 4 ปีที่แล้ว

    Thank you,this was very helpful.

  • @Salmanul_
    @Salmanul_ 3 ปีที่แล้ว

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

  • @davidsweeney111
    @davidsweeney111 6 ปีที่แล้ว

    This is awesome, thanks!

  • @elizabethmeghana9614
    @elizabethmeghana9614 3 ปีที่แล้ว

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

  • @AnandaSKitchen
    @AnandaSKitchen 3 ปีที่แล้ว

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

  • @bishalthapa3874
    @bishalthapa3874 4 ปีที่แล้ว

    thanks a lot

  • @LilYunjin
    @LilYunjin 4 ปีที่แล้ว

    Thanks.

  • @sadaf6295
    @sadaf6295 3 ปีที่แล้ว

    Hey can u make Heisenberg hamiltonian in python

  • @antoniosaldanio3042
    @antoniosaldanio3042 4 ปีที่แล้ว

    Perfect!

  • @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.

  • @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

  • @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.

  • @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.

  • @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