clc; clear; close all; warning off all dformat=0; %************************************************************** %Data Input Start %************************************************************** [filename, pathname] = uigetfile({'*.xls;*.txt','Data Files (*.xls,*.txt)'}, 'Select Excel or Text File '); [pathstr,name,ext,versn] = fileparts(filename); if ext=='.txt' if (~isdeployed) addpath (pathname) end cd (pathname) copyfile(filename,['name' '.xls']) end pwm=xlsread(filename); [length c]=size(pwm); % % generate random sequences and score them % nseq = 10000; seq = ceil(4*rand(nseq,length)); big = 0; for i = 1:nseq tot = 0; for j = 1:length tot = tot + pwm(j,seq(i,j)); end score(i) = tot; if score(i) > 14.4 big = big+1; end end hist(score); meanscore = mean(score) medscore = median(score) big