summaryrefslogtreecommitdiff
path: root/125/DEPENDENCIES/dct_mtx.sce
diff options
context:
space:
mode:
Diffstat (limited to '125/DEPENDENCIES/dct_mtx.sce')
-rwxr-xr-x125/DEPENDENCIES/dct_mtx.sce7
1 files changed, 7 insertions, 0 deletions
diff --git a/125/DEPENDENCIES/dct_mtx.sce b/125/DEPENDENCIES/dct_mtx.sce
new file mode 100755
index 000000000..b42bec4a8
--- /dev/null
+++ b/125/DEPENDENCIES/dct_mtx.sce
@@ -0,0 +1,7 @@
+function[DCT] = dct_mtx(n)
+[cc,rr] = meshgrid(0:n-1);
+//disp(cc)
+//disp(rr)
+DCT = sqrt(2 / n) * cos(%pi * (2*cc + 1) .* rr / (2 * n));
+DCT(1,:) = DCT(1,:) / sqrt(2);
+endfunction \ No newline at end of file