function [] = modePlot(x_step, y_step, spacial_step, n_delay, modeProfile) % x_step and y_step are dimension of plot points % spacial_step is step size % d_delay is the delay number % modeProfiles contains the normalized data of all modes X = 0:(x_step-1); Y = 0:(y_step-1); Z = zeros(x_step,y_step); for x = 1:x_step for y = 1:y_step temp = x + (y-1)*x_step; Z(x,y) = modeProfile(temp, n_delay); end end Z_gray = mat2gray(Z); imshow(Z_gray) colorbar; xlabel('X position'); ylabel('Y position'); axis equal tight end