Matlab plot

Discussion in 'Programmer's Corner' started by Cerkit, Jan 9, 2010.

  1. Cerkit

    Thread Starter Active Member

    Jan 4, 2009
    275
    3
    Hi. I am trying to plot function X in matlab

    hbar=1.0552e-034; % h/2pi [J.s]
    me=0.067*9.11e-31; % electron effective mass [Kg]
    L=0.35*10^-9; %Well width

    X=(tan(((sqrt(2*me*E))/(hbar))*L))

    I want to plot X vs E with E ranging from 0 to 75. Can someone help me with this?
     
  2. mik3

    Senior Member

    Feb 4, 2008
    4,846
    63
    Define E=0:0.01:75;

    then type your X

    X=......;

    then

    plot(E,X)
     
  3. Cerkit

    Thread Starter Active Member

    Jan 4, 2009
    275
    3
    I tried that but my plot looks like noise rather than a tan function.
     
Loading...