matlab -nojvm -nosplash
where the first option avoids costly start up of Java virtual machine(s),
and the second prevents the advertisement screen on startup.
This can make startup faster. A few commands like profile viewer
require the JVM to be running, but very few are in that category.
for k = 1:n
C(1:n,k) = v(1:n);
end
makes n calls for memory allocation from operating system, and it requires
copying over the part of C built up so far to the newly allocated
space each time. Instead use
C = zeros(n,n);
for k = 1:n
C(1:n,k) = v(1:n);
end
Better yet, use: C = v(1:n)*ones(1,n);