You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: roadstart.m
    path of file: ./repos/Graduation-Design-and-MATLAB-Code-/时空
    
    the code of the file until where you have to start completion: function [matrix_cells_start]=roadstart(matrix_cells,n)
%道路上的车辆初始化状态，元胞矩阵随机为 0或 1，matrix_cells 初始矩阵， n初始车辆数
k=length(matrix_cells);
z=round(k*rand(1,n));
for i=1:n

    
function [matrix_cells_start]=roadstart(matrix_cells,n)
%道路上的车辆初始化状态，元胞矩阵随机为 0或 1，matrix_cells 初始矩阵， n初始车辆数
k=length(matrix_cells);
z=round(k*rand(1,n));
for i=1:n
j=z(i);
if j==0
matrix_cells(j)=0;
else
matrix_cells(j)=1;
end