%demo2.m %This file loads 'cal.mat', prompts you to select a data file, and %then spits out a scaled data vector for height at each wave probe (in cm) %Load calibration data load cal; %open window to get data file: [filen, pathn] = uigetfile('*.i32','OPEN Wave Data File'); filestub = [pathn '' filen]; %Load i32 format data and create array with channel 1,2,3 in columns: [data_all]= parsedl2(filestub,3)'; %Apply calibration coefficient and offset for each probe: probe1=(data_all(:,1)-zero_off(1))*ccoefs(1); probe2=(data_all(:,2)-zero_off(2))*ccoefs(2); probe3=(data_all(:,3)-zero_off(3))*ccoefs(3); %Develop time scale dt=.01; %Sampling at 100Hz time=0:dt:(length(data)-1)*dt;