You may get better help if you post a self-contained minimal working example that highlights where you got stuck. The above code is not that, but a couple of comments:
-
length
may denote a variable, but it is also a function in Julia, use something likelengths
orlen
(cfc(...)
inR
). Or did you meanlength(...)
? - You can use
'
for transpose. - You can use Greek letters (try typing
\mu
and pressTAB
), your code will be much more compact. - If
n
is an integer,ones(n)
will give you a vector of1.0
s. UseI
for the identity matrix.
Also, please delimit your code with ```julia … ```.