about summary refs log tree commit diff
path: root/sourcecodes/restructuremap.php
diff options
context:
space:
mode:
authorziejd22017-09-14 15:39:41 -0500
committerziejd22017-09-14 15:57:50 -0500
commitc4f926438dcb8abe805e910399940f79ff643c4b (patch)
tree3146d05ada5cf4b48d9bdd16c1baa498e8df7192 /sourcecodes/restructuremap.php
parent57ebf49403b75dcf8482d174b59f7fd2a961d98e (diff)
downloadBNW-c4f926438dcb8abe805e910399940f79ff643c4b.tar.gz
Add files via upload
Diffstat (limited to 'sourcecodes/restructuremap.php')
-rw-r--r--sourcecodes/restructuremap.php42
1 files changed, 42 insertions, 0 deletions
diff --git a/sourcecodes/restructuremap.php b/sourcecodes/restructuremap.php
new file mode 100644
index 00000000..fb2a86cc
--- /dev/null
+++ b/sourcecodes/restructuremap.php
@@ -0,0 +1,42 @@
+<?php
+
+
+function reversemap($id,$val,$keyval)
+{
+
+$dir="./data/";
+
+$matfile=$dir."$keyval"."map.txt";
+
+
+$matrix=file("$matfile");
+$matrix1=file_get_contents("$matfile");             
+$str_arrmat=array();
+$str_arrmat=explode("\n",$matrix1);
+$datamat=array();
+$data_cell=array(); 
+
+$data_cell_canvas=array();
+
+foreach($str_arrmat as $line)
+{
+
+$data_cell_canvas=explode("\t",$line);
+$map_name=trim($data_cell_canvas[0]);
+$map_type=$data_cell_canvas[1];
+$map_std=$data_cell_canvas[2];
+$map_mean=$data_cell_canvas[3];
+if($id==$map_name)
+{
+ $mapval=($val-$map_mean)/$map_std;
+  break;
+}
+
+}
+return $mapval;
+}
+
+
+
+?>
+