annotate splicesitescore/splicemodels/hashseq.m~ @ 0:22486256ed0d

Uploaded
author xuebing
date Sat, 31 Mar 2012 21:51:30 -0400
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
22486256ed0d Uploaded
xuebing
parents:
diff changeset
1 function [sum ] = hashseq(seq)
22486256ed0d Uploaded
xuebing
parents:
diff changeset
2 sum = 0;
22486256ed0d Uploaded
xuebing
parents:
diff changeset
3 len = length(seq);
22486256ed0d Uploaded
xuebing
parents:
diff changeset
4 four = [1;4;16;64;256;1024;4096];
22486256ed0d Uploaded
xuebing
parents:
diff changeset
5 for i = 1:len
22486256ed0d Uploaded
xuebing
parents:
diff changeset
6 sum = sum + seq(i) * four(len - i - 1) ;
22486256ed0d Uploaded
xuebing
parents:
diff changeset
7 end
22486256ed0d Uploaded
xuebing
parents:
diff changeset
8