function [x_new,y_new] = sortbyx(x,y,order_flag) This function will sort the corresponding vectors x and y in increasing order of x while preserving the correspondence with y %Input variable(s)%% %%%%%%%%%%%%%%%%%%%% x = input vector 1 for sorting y = input vector 2, sorted along with x order_flag = 1 if sorting x from lowest to highest,=-1 if other way %%%%%%%%%%%%%%%%%%%%% %Output variable(s)%% %%%%%%%%%%%%%%%%%%%%% x_new = sorted x vector y_new = sorted y vector (according to x)