title: Import variables from file
body: <p>Hi so I have a file called config.m that contains a list of variables along with some comments. I wanted to basically load that script up through another matlab script so that the variables would be recognized and used and could also be changed easily. Here is what my file with the variables looks like.</p>
  
  <pre><code>%~~~~~~~~~~~~~~~~~
  %~~~[General]~~~~~
  %~~~~~~~~~~~~~~~~~
  %path to samtools executable
  samtools_path = '/home/pubseq/BioSw/samtools/0.1.8/samtools';
  %output_path should be to existing directory, script will then create tumour
  %and normal folders and link the bam files inside respectively
  output_path = '/projects/dmacmillanprj/testbams'; 
  prefix = %prefix for output files
  source_file = % from get_random_lines.pl, what is this?
  % The window size
  winSize = '200';
  % Between 0 and 1, i.e. 0.7 for 70% tumour content
  tumour_content = '1';
  % Should be between 0 and 0.0001
  gc_window = 0.005;
  % Path to tumour bam file
  sample_bam = '/projects/analysis/analysis5/HS2310/620GBAAXX_4/bwa/620GBAAXX_4_dupsFlagged.bam';
  % Path to normal bam file
  control_bam = '/projects/analysis/analysis5/HS2381/620GBAAXX_6/bwa/620GBAAXX_6_dupsFlagged.bam';
  </code></pre>
  
  <p>I have tried this:</p>
  
  <pre><code>load('configfile.m')
  ??? Error using ==&gt; load
  Number of columns on line 2 of ASCII file /home/you/CNV/branches/config_file/CopyNumber/configfile.m
  must be the same as previous lines.
  </code></pre>