create_dummy_var_2024_02_14.txt 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  2. % G.V. Anguelova %
  3. % 09-06-2022 %
  4. % create dummy variable voor test sinus met noise of alleen noise %
  5. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
  6. % Create a 15-by-250-by-18 array of random numbers.
  7. X = randn([1000,250,18]);
  8. x = -pi:0.1:pi; % met 0.1 lengte y is 63
  9. y = sin(x) *15; % *15 zodat het te onderscheiden is ook visueel van X (max(X) rond 3 a 4)
  10. % add sinus in de eerste 300 signalen
  11. X_sin = X;
  12. for i = 1:100
  13. X_sin(i,1:63,1) = X_sin(i,1:63,1) + y; % eerste epoch; eerste kanaal
  14. end
  15. for i = 101:200
  16. X_sin(i,1:63,2) = X_sin(i,1:63,2) + y; % 2e epoch; 2e kanaal
  17. end
  18. for i = 201:300
  19. X_sin(i,1:63,3) = X_sin(i,1:63,3) + y; % 3e epoch; 3e kanaal
  20. end
  21. % X_sin(4,1:63,4) = X_sin(4,1:63,4) + y; % 4e epoch; 4e kanaal
  22. % X_sin(5,1:63,4) = X_sin(5,1:63,5) + y; % 5e epoch; 5e kanaal
  23. % export X_sin naar PyCharm als input variabele
  24. % create output variabele
  25. A1 = ones(300,1);
  26. A2 = zeros(700,1);
  27. Y_sin = [A1; A2]; % onder elkaar
  28. % export to python