function [result]=find_steps(path) // Read Data data_values=fscanfMat(path) // Set the colums, where which value is positioned Bit_1_step=3; bit_1_corresponding=4; // Evaluate Bit_1 data_temp_1=data_values(:,Bit_1_step); //Values of the digital step-function data_temp_2=data_temp_1; //Copy //Shift the second vector temp=data_temp_2(1,:); data_temp_2(1,:)=[]; data_temp_2(size(data_temp_2)+1,:)=temp; data_temp_3=data_temp_2-data_temp_1; data_temp_3=spget(sparse(round(data_temp_3/10))); //Create Sparse-matrix //Read corresponding values for i=1:size(data_temp_3,1) result(i,1)=data_values(data_temp_3(i,1),Bit_1_step); result(i,2)=data_values(data_temp_3(i,1),bit_1_corresponding); end // Create new name for the result-file path=part(path,1:length(path)-4)+'_result.txt' //Save the result-matrix fprintfMat(path,result) endfunction