function mCreateRateDistortionGraph( graph_title, x_data, y_data ) line_style = [ '- '; '--'; '-.'; ': ' ]; %point_style = 'ox+*sdv^<>ph'; point_style = '.'; [ row_total, col_total ] = size( x_data ); if row_total > col_total fprintf( 2, 'Warning: this function requires data in rows, not columns!' ) end clf reset; hold on; for row = 1:row_total plot( x_data(row,:), y_data(row,:), ... sprintf( '%s', ... %point_style( mod( row, length(point_style) ) ), line_style( mod(row-1,length(line_style) )+1,: ) ) ); end grid on highest_rate = floor( max(max( y_data ) ) ) + 1; axis( [ 0 40 0 highest_rate ] ); title( graph_title ); xlabel( 'SNR [dB]' ); ylabel( 'Rate [b/pel]' ); hold off; if row_total > 0 fprintf( 1, 'Use the legend command to identify sequences\n' ); end fprintf( 1, 'To print this graph: "print -deps "\n' );