title: How can I pass char values as double values in any matlab function provided I have the double variable of the same name as char(please see detail)?
body: <p>%% I want to pass the values of char (here var_name{1})as that of     double(here x) in histogram function. How can I do that?   </p>
  
  <pre><code> % var_name could be much bigger
   h={'h1','h2'}
   var_name ={'x','y'}
   time_step=100;
   for i =1:time_step
     x=%code that extract x from some data file %
     y= %get y from some other file (actually using find command)
    %the time loop will overwrite the x and  y  values 
   ` for k=1:length(var_name)
      %figure  h 
  
      h{k}=histogram(var_name{k}) % I have been suggested to avoid eval  % 
  
      %lot of procees to do here for every variable  say  x y than save  the          
       %saveas(h{k},sprintf(...))
     end 
  
    end    
  </code></pre>