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: multi_driveway.m
    path of file: ./repos/Mathematical_Modeling/Cellular automaton
    
    the code of the file until where you have to start completion: function [ v d p ] = multi_driveway( nl,nc,fp,dt,nt )
%  在某一特定车流密度下的（车流密度由fp决定）单、双车道仿真模型
%  nc:车道数目（1或2），nl:车道长度??输入参数
%  v:平均速度，d:换道次数（1000次）p:车流密度??输出参数
%  dt:仿真步长时间，nt:仿真步长数目??输入参数

    
function [ v d p ] = multi_driveway( nl,nc,fp,dt,nt )
%  在某一特定车流密度下的（车流密度由fp决定）单、双车道仿真模型
%  nc:车道数目（1或2），nl:车道长度??输入参数
%  v:平均速度，d:换道次数（1000次）p:车流密度??输出参数
%  dt:仿真步长时间，nt:仿真步长数目??输入参数
%  fp:车道入口处新进入车辆的概率??输入参数
%  test:
%  nl = 400;fp = 0.5;
%  nc = 2;dt=0.01;nt=500;

   %构造元胞矩阵
   B=ones(2*nc+1,nl+2);
   %奇数行为不可行车道
   B(1:2:(2*nc+1),:)=1.2;
   %初始化仿真元胞状态（1为无车，0为有车）
   bb=B(2:2:2*nc,:);bb(bb~=0)=1;B(2:2:2*nc,:)=bb;B(2:2:2*nc,end