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:
-
lengthmay denote a variable, but it is also a function in Julia, use something likelengthsorlen(cfc(...)inR). Or did you meanlength(...)? - You can use
'for transpose. - You can use Greek letters (try typing
\muand pressTAB), your code will be much more compact. - If
nis an integer,ones(n)will give you a vector of1.0s. UseIfor the identity matrix.
Also, please delimit your code with ```julia … ```.