From bc5ecd6da7f068a12b9ee5397178723481c7a3ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Lindh=C3=A9?= Date: Tue, 31 Oct 2017 08:33:46 +0100 Subject: Move all files one level down --- broccoli/src/pasad.c | 160 --------------------------------------------------- 1 file changed, 160 deletions(-) delete mode 100644 broccoli/src/pasad.c (limited to 'broccoli/src/pasad.c') diff --git a/broccoli/src/pasad.c b/broccoli/src/pasad.c deleted file mode 100644 index 58dc9ab..0000000 --- a/broccoli/src/pasad.c +++ /dev/null @@ -1,160 +0,0 @@ -/* - - -Course- - DAT300: Data-driven support for cyber-physical systems - - -Project- - Intrusion Detection for Industrial Control Networks - - -Group 8- - Hassan Ghalayini - hassang@student.chalmers.se - Malama Kasanda - malama@student.chalmers.se - Vaios Taxiarchis - vaios@student.chalmers.se - - Modified by Robin Krahl , Group 3: - - Write sensor readings and distance to text files - - Take the arguments N, L, r from argc - - Formatting - - */ - -#include -#include -#include -#include "midbro.h" - -int main(int argc, char **argv) -{ - clock_t begin; - int l=0; - double t=30; - - if (argc != 4) { - fprintf(stderr, "Usage: %s N L r\n", argv[0]); - fprintf(stderr, " Example values: N = 1000, L = 500, r = 18\n"); - fprintf(stderr, "Wrong argument count. Aborting.\n"); - return 1; - } - - int N = atoi(argv[1]); - int L = atoi(argv[2]); - int r = atoi(argv[3]); - - /* Arrays and variables */ - int sL=86336; - double s[sL]; - double U[L][r]; - double X[L]; - double product_Xt_P_X; - double product_Xt_X; - int i=0,j=0,c=0,d=0,k=0; - double sum=0.0,dist=0.0; - - start_data_capture(); - - /* File Descriptor to read projection matrix from U.txt */ - FILE *file; - char ch='a'; - int flag=0; - file=fopen("U.txt", "r"); - if (!file) { - fprintf(stderr, "Could not open U.txt. Aborting.\n"); - return 1; - } - printf(" >Reading U[%dx%d] matrix from .txt file...",L,r); - /* Read all values to an array */ - for(i=0;i