1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Solid State Physics - Octave (programming) help

  1. Feb 16, 2009 #1
    I'm currently undertaking a course in Solid State Physics and my professor has asked us to undertake some work in the free software 'Octave'. I have not had any programming experience in my life and I am feeling very much out of my depth.

    The lecturer gave us an initial file with the relevant code in it and we had to modify certain parameters and see how that affected the output.

    The one that is giving me grief is turning the one basis lattice into a two basis lattice.

    The original code to create the lattice was "c=c+atom(x.-n*a,w)", where x essentially represents the x axis and c the y axis. w is a variable to determine the type of atom in each basis, a is the lattice constant and n is related to the number of atoms in the crystal. The question says "Put two identical atoms in each cell, n_at(x; w=16)+n_at(x-1/3;w=16)"

    So my attempt was to replace the above code with: "c=c+atom(x.-n*a,w)+atom(x.-n*a-1/3,w)"

    But to no avail. I'm not sure what I'm doing wrong, but if anyone could give me a push or perhaps suggest somewhere where I can find help on this (the Octave website wasn't much use) I'd be greatly appreciative.
  2. jcsd
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted

Similar Discussions: Solid State Physics - Octave (programming) help
  1. Solid state physics (Replies: 2)

  2. Solid state physics (Replies: 1)

  3. Solid state physics (Replies: 1)