Last active
March 11, 2019 05:25
-
-
Save AidanRocke/1c154b42a52902015a83603a5efb640e to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using LinearAlgebra | |
using Random | |
function circuit_complexity(N) | |
radii = zeros(1,N); | |
for i=1:N | |
sum_of_radii = 0.0 | |
## the input signal | |
X = rand(3,1)*2 .-1.0 | |
W= rand(3,3)*sqrt(2/3) | |
## the main calculation | |
for j=1:100 | |
sum_of_radii += norm(W^i*X-X) | |
end | |
radii[i] = sum_of_radii/100 | |
end | |
return radii | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment