Hey, physics side of tumblr, can you help me with some homework? I can't get this to work
A particle with mass M has a speed V going up. A force acts on the particle with force F, perpendicular to the direction of its movement at all times (like a magnetic force \ an object tied to a rope). No gravity is applied
Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
â Live Streamingâ Interactive Chatâ Private Showsâ HD Qualityâ Free Actions
Free to watch âą No registration required âą HD streaming
Hello physicsblr people of Tumblr! I'm having an issue with a MATLAB app file, and was wondering if anyone knew what the deal with it might be. Code + more info under the cut! Any help/commiseration/reblogs MUCH appreciated :)
Essentially, I'm looking to model a free particle wave packet dispersing over time. In the base code, it works just fine! See:
However, once I switch it into the app editor, attach the wavelength value to a slider, and change all the plot functions to be on the UIAxes, it will only plot the initial state. See:
If anyone knows why the code (below, "problem areas" highlighted in red) won't evolve over time in the app like it does in the code editor, PLEASE help!
APP CODE:
% Parameters, Constants and Other Such Sundry Items
Nx = 501; % Number of x points [1001]
Nt = 4000; % Number of time steps (not seconds)
L = 5e-9; % Width of X domain [5e-9]
me = 9.11e-31; % electron mass
hbar = 1.06e-34; % Planck's constant
e = 1.602e-19; % elementary charge
x = linspace(0,L,Nx);
dx = x(2) - x(1);
C1 = 1/10; % Various Constants and things to make life easier
dt = C1 * 2 * me * dx^2 / hbar;
C2 = e*dt/hbar;
% Functions, etc.
psiR = zeros(Nt,Nx); % wave functionâreal part
psiI = zeros(Nt,Nx); % wave functionâimaginary part
U = zeros(1,Nx); % potential energy
% Starting packet position
nx1 = round(Nx/6);
s = L/25; % wave pulse width
wL = app.WavelengthSlider.Value; % this is the only modification to this part of the code. In the original code, it's set to 1.6e-10.
yR = exp(-0.5.*((x-x(nx1))./s).^2).*cos((2*pi).*(x-x(nx1))./wL);
yI = exp(-0.5.*((x-x(nx1))./s).^2).*sin((2*pi).*(x-x(nx1))./wL);
psiR(1,:) = yR;
psiI(1,:) = yI;
% Solve Schrödinger Equation
for nt = 1 : Nt-1
for nx = 2 : Nx - 1
yR(nx) = yR(nx) - C1*(yI(nx+1)-2*yI(nx)+yI(nx-1)) + C2*U(nx)*yI(nx);
end
psiR(nt+1,:) = yR;
for nx = 2 : Nx-1
yI(nx) = yI(nx) + C1*(yR(nx+1)-2*yR(nx)+yR(nx-1)) - C2*U(nx)*yR(nx);
end
psiI(nt+1,:) = yI;
end
for nt = 2:Nt
psiI(nt,:) = 0.5*(psiI(nt,:) + psiI(nt-1,:));
end
% Plotting (This is where the troubles begin; app axes callbacks correspond to the above labelled axes)
for time = 1: 100: Nt
xP = x.*1e9;
yP = psiR(time,:);
plot(app.PsiRAxes,xP,yP,'Color','#54b0b6','linewidth',2)
hold on
yP = psiR(1,:);
plot(app.PsiRAxes,xP,yP,'Color','#54b0b6','linewidth',1)
hold off
grid on
box on
xP = x.*1e9;
yP = psiI(time,:);
plot(app.PsiIAxes,xP,yP,'Color','#E1C699','linewidth',2)
hold on
yP = psiI(1,:);
plot(app.PsiIAxes,xP,yP,'Color','#E1C699','linewidth',1)
hold off
grid on
box on
xP = x.*1e9;
yP = psiR(time,:).^2 + psiI(time,:).^2;
plot(app.ProbAxes,xP,yP,'k','linewidth',2)
hold on
yP = psiR(1,:).^2 +psiI(1,:).^2;
plot(app.ProbAxes,xP,yP,'k','linewidth',1)
hold off
grid on
box on
hold off
pause(0.1)
end
THANK YOU SO MUCH IF YOU READ THIS FAR! Complimentary picture of my cat:
im in my last year of school and im planning to take up phy in college too! do you have any thing for me that i should keep in mind while studying for exams+first year experiences?
First year of college is an adjusting period. Youâre not used to things happening the way they happen in college, classes and exams and what not. So, most importantly donât be too hard on yourself in your first year. By the end of the first semester youâll sort of have an idea on how to go about things and by the end of the year youâll know how to handle things. It might be overwhelming and scary and stressful, but youâre not alone everyone goes through that.
Just show up for classes, it can be really hard to be disciplined enough to go for every class because you can miss your class and no one will give a fuck, but it WILL affect your understanding, of course itâs not possible to never skip so when you do make sure you go through the slides or the reading material or some one elseâs notes from that class before you attend the next one. Make sure you do your assignments on your own and ask your doubts, if you donât wanna ask in class or even office hours, ask a friend. But slowly youâll have to have good relations with your professors if you want to get into research and carry on with physics. By the end of your degree you should have at least two professors who can write you a good LOR. Do your research on your professors, ask to work on a project under them, if they donât have one going on which involves students, come up with your project idea or talk to the Head of the Department. You should have at least one project that youâve done in your bachelors because thereâs a lot of competition out there. And this will give you and edge.
As for exams, if you mean university exams, it depends on your prof. If they give more theoretical question papers or problem sets or a mix of both. But in general; physics is a subject where you can follow multiple approaches and get the same answer. So you have to specify what youâre doing. For eg for a particular question you can resolve forces and solve for velocity or you can use conservation of energy, itâs almost always entirely upto you, so you have to specify âacc to WE theorem...â because the prof doesnât know whatâs going on in your head so make sure you tell them what is going on, it might seem obvious to you but youâll always benefit from writing whatever youâre thinking. Like âtaking reduced mass because the masses are comparable and then taking center of massâ to solve a problem, that may seem obvious but doesnât hurt to mention.
One tip to understand the subject better, just understand what the laws and the equations mean. You need to know what the formula is telling you and what itâs not. Try to find or make your own graphical representation of a formula, it is helpful in visualising what is actually happening. Oh and whenever you get stuck, try to derive your own formula based on your existing knowledge and keep it the last resort to find the solution from a book or whatever. That will help you improve your mathematical intuition and make you better at the subject because if you were wrong, youâll know why you canât use that concept there which is extremely helpful.
Best of luck anon!! I hope you enjoy university and physics and that itâs good to you!!!
PS. Iâm strictly speaking from a private Indian universityâs POV, idk how the projects and stuff work in govt. unis but really donât know how the other countriesâ education system is.
Iâve decided to relearn physics cuz I fucking love physics and Iâm taking some really good notes so if youâre in physics and youâd like some help or just some notes, feel free to message me!
Anya is live and ready to show you everything. Watch her strip, dance, and perform exclusive shows just for you. Interact in real-time and make your fantasies come true.
â Live Streamingâ Interactive Chatâ Private Showsâ HD Qualityâ Free Actions
Free to watch âą No registration required âą HD streaming
Already given an answer here, so why not! I can help with high school science (biology, chemistry, math and physics), chemistry up to college level, calc until the 2 (multiple derivatives), and biochemistry. If standard science is not your thing, I'm Brazilian, so I can cover portuguese and give some perspective on our history for those essays on foreign matters~
Iâm scrolling through you blog and at this point I donât even know if Iâm laughing or crying cause physics is so much pain but also I like it help dm pls
Hello! Iâm not sure how much help weâll be; after all, our own physics class ended last spring. We can try to help to the best of our abilities this weekend and if we fail, we can redirect you to good practice problems and helpful websites so you donât have to wade through all the internet sludge.Â
This goes for anyone who needs assistance with high school physics. I donât pretend to be qualified above an AP Mechanics level.Â