# hw5 - solution for k between 0 and π/L this is the...

This preview shows pages 1–2. Sign up to view the full content.

Programming Assignment 5 ENGR 3, Summer Session B 2006 Due: Monday, September 11 11:59pm Instructions: Complete the following parts. You will need to copy your MATLAB files to your ECI account using an ftp program (eg. WinSCP or Filezilla). Once the files are in your account directory, you can log in using PuTTY and submit the assignment using the command “turnin [email protected] QWell.m gaussian.m” Part A (10 points) One of the first equations students taking quantum mechanics are asked to solve is: k tan kL 2 = b 2 k 2 Write a program which prompts the user to enter values for b and L (both positive) and then calculates k . The program should also plot the left-hand side and right-hand side of the equation versus k between 0 and π/L. Some combinations of b and L give multiple solutions for k . There will always be exactly one

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: solution for k between 0 and π/L , this is the solution you should find. The name of this program must be QWell.m Example output for Part C: >> QWell Enter a positive number for L: 2 Enter a positive number for b: 5 k = 1.31 >> Part A (15 points) Consider the function. y = 5 e − x − 3 2 Your job is to write a MatLab program which asks the user to enter values xmin and xmax , and plots this function from xmin to xmax using a logarithmic y-axis, and calculates the area under this curve between xmin and xmax . The name of this program must be gaussian.m Your output should look like the following: >> gaussian Enter a value for xmin: -1 Enter a value for xmax: 4 The area under the curve between x=-1.00 and x=4.00 is 8.16 >>...
View Full Document

## This note was uploaded on 08/06/2010 for the course ENGR 3 taught by Professor Ben-yaakov during the Summer '08 term at UCSB.

### Page1 / 2

hw5 - solution for k between 0 and π/L this is the...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online