function [t,v]=getdata(s_file);
% getdata.m
% Usage: [t,v]=getdata(filename), the filename is a string in quotes
% This is a matlab function that takes a data file collected
% by Labview, displays the data 
% and then assigns the variable t to the time track and 
% the variable v to the voltage track.
% 
% Note that t is a nx1 vector and v is a nxm matrix where
% n is the number of data point and m is the number of channels
%
% Usage: t and v are the output time and voltages

eval(s_file);
%assign variables
string=sprintf('t=t_%s;',s_file);
eval(string);
string=sprintf('v=v_%s;',s_file);
eval(string);
%clear original variables
string=sprintf('clear t_%s',s_file);
eval(string);
string=sprintf('clear v_%s',s_file);
eval(string);
string=sprintf('clear ch_%s dt_%s fs_%s n_%s',s_file,s_file,s_file,s_file);
eval(string);
clear string s_file;
t=t';





