I don't know the theoretical answer to this.
Practically, though, you can run this code to see that the generation time grows very slowly.
Here's some code that will generate matrices of growing size (up to the default maximum size, when it will error out).
N = 0; STEP = 50; KILO = 1000; MILLI = 0.001;
figure while true N = N + STEP; tic x = zeros(N); t(N/STEP) = toc; clear x plot((STEP:STEP:N)/KILO,t/MILLI,'.-') title('Time to generate zeros(N,N)') xlabel('N/1000') ylabel('Time [milliseconds]') drawnow end
You'll get a different curve every time you try this, but a typical one I got looks like this:
You can see the growth. It's not easy to discern the shape, but regardless of the shape, the time to generate the largest matrix MATLAB can store (46350x46350 on my machine) is still only about 0.3 milliseconds.