Sha256: b731ce72f338910e38a66fc7174ce176eed98d4c8b376c37f7504131fc650124

Contents?: true

Size: 906 Bytes

Versions: 14

Compression:

Stored size: 906 Bytes

Contents

d = dir('*.txt');

for i=1:length(d)
   filename = d(i).name;
   f = fopen(filename,'r');
   ink = textscan(f, 'ink:%f', 1);
   drk = textscan(f, 'drk:%f', 1);
   pap = textscan(f, 'pap:%f', 1);
   cal = textscan(f, 'cal:%f', 1);
   cho = textscan(f, 'cho:%f', 1);
    
   ink = ink{1};
   drk = drk{1};
   pap = pap{1};
   cal = cal{1};
   cho = cho{1};
   
   s = sprintf('%s --> ink %.1f, drk %.1f, pap %.1f, cal %.1f, cho %.1f', filename, ink, drk, pap, cal, cho);
   disp(s);
   
   if ink > 240
      disp('invalid ink')
      continue
   end
   
   dA = textscan(f, '%f');
   fclose(f);
   data = dA{1};
   
   hold off
   edgehist(data, 0:5:255)
   set(gca, 'xlim', [ink 255])
   ylim = get(gca, 'ylim');
   hold on
   
    
   line([drk drk], ylim, 'color', 'k');
   line([pap pap], ylim, 'color', 'y');
   line([cal cal], ylim, 'color', 'r');
   line([cho cho], ylim, 'color', 'b');
   pause
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
mork-0.15.0 spec/samples/syst/histo.m
mork-0.14.0 spec/samples/syst/histo.m
mork-0.13.2 spec/samples/syst/histo.m
mork-0.12.0 spec/samples/syst/histo.m
mork-0.11.2 spec/samples/syst/histo.m
mork-0.11.1 spec/samples/syst/histo.m
mork-0.10.0 spec/samples/syst/histo.m
mork-0.9.3 spec/samples/syst/histo.m
mork-0.9.2 spec/samples/syst/histo.m
mork-0.9.1 spec/samples/syst/histo.m
mork-0.9.0 spec/samples/syst/histo.m
mork-0.8.1 spec/samples/syst/histo.m
mork-0.8.0 spec/samples/syst/histo.m
mork-0.7.0 spec/samples/syst/histo.m