This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Phaw! This certainly needs cleaning up, but it does work. | |
#include <complex> | |
#include <iostream> | |
#include <cmath> | |
using namespace std; | |
typedef long double R; | |
typedef complex<double> cplex; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [ out_sym, table ] = slice( in_sym, mod_type ) | |
%SLICE Makes hard decision on input symbols with designated modulation type | |
% | |
% Inputs: | |
% in_sym: input symbols to be sliced | |
% mod_type: modulation type, BPSK, QPSK, 16QAM, or 64QAM | |
% | |
% Outputs: | |
% out_sym: output symbols | |
% table: mapping alphabet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<li class="cartoon-img">{*}<a href="{%}" title="{%}">{*}<img src="{%}" title="{*}" alt="{*}" src="{*}" alt="Bad Image" onError="this.src='{*}';"/>{*}</a>{*}<h6><a target="_blank" href="{*}" title="{*}"><strong>{*}</strong></a></h6>{*}<p>{*}<em>{*}</em></p>{*}</li> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
opendir(DIR, $dir) or die $!; | |
while (my $file = readdir(DIR)) { | |
next if($file =~ /^\.+/); ## don't show "." and ".." | |
next if(-d "$dir/$file"); ## don't show directories | |
print "$file\n"; | |
} | |
closedir(DIR); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/perl | |
########################################## | |
## Author: Yi-Chao Chen @ Hauoli | |
## | |
## - input: | |
## | |
## - output: | |
## | |
## - e.g. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use DateTime::Format::Strptime; | |
my $parser = DateTime::Format::Strptime->new( | |
pattern => '%B %d %H-%M-%S %Y', | |
on_error => 'croak', | |
); | |
my $dt = $parser->parse_datetime($file); | |
print $dt->year()."/".$dt->month()."/".$dt->day()." ".$dt->hour().":".$dt->minute().":".$dt->second()."\n"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% | |
%% Yi-Chao Chen @ UT Austin | |
%% | |
%% - Input: | |
%% | |
%% | |
%% - Output: | |
%% | |
%% | |
%% example: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
reset | |
set terminal postscript eps enhanced color 28 dl 4.0 | |
# set terminal png enhanced 28 size 800,600 | |
# set terminal jpeg enhanced font helvetica 28 | |
set size ratio 0.7 | |
data_dir = "./DATA_DIR/" | |
fig_dir = "./FIG_DIR/" | |
file_name = "FILE_NAME" | |
fig_name = "FIG_NAME" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
my $cmd = "sed 's/DATA_DIR/xxx/g; s/FIG_DIR/xxx/g; s/FILE_NAME/xxx/g; s/FIG_NAME/xxx/g; s/DEGREE/xxx/g; s/X_LABEL/xxx/g; s/Y_LABEL/xxx/g; s/X_RANGE_S/xxx/g; s/X_RANGE_E/xxx/g; s/Y_RANGE_S/xxx/g; s/Y_RANGE_E/xxx/g; s/TITLE_1/xxx/g; s/TITLE_2/xxx/g;' xxx.mother > tmp.xxx"; | |
`$cmd`; | |
$cmd = "gnuplot tmp.xxx"; | |
`$cmd`; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input_dir="/u/yichao/dir" | |
cnt=1 | |
ls ${input_dir} | while read f ; do | |
echo "${cnt}: ${input_dir}$f" | |
let cnt=${cnt}+1 | |
done |
OlderNewer