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: plot_tecplot.m
    path of file: ./repos/MSS/HYDRO/gdf
    
    the code of the file until where you have to start completion: function plot_tecplot(filename,colorcode,figno)
% PLOT_TECPLOT (MSS HYDRO)
%
% Plot Tecplot geometry files (*_pan.dat) for semisubs in 3D
% This file is generated by WAMIT (se example 15)
%
% Examples:
%
% >> plot_tecplot(filename,colorcode,figno);
% >> plot_tecplot('test15_pan','black',1);       % WAMIT Example 15
%
% -------------------------------------------------------------------------
% Inputs:
%    filename:    Wamit generated Techplot file without extension
%    colorcode:   'r','g','b','c','m','y','w','k' or coslormaps [0 0 1] etc.
%    figno:       figure number
%
% -------------------------------------------------------------------------
% Author:    Thor I. Fossen 
% Date:      2005-09-24 
% Revisions: 
% _________________________________________________________________________
%
% MSS HYDRO is a Matlab toolbox for guidance, navigation and control.
% The toolbox is part of the Marine Systems Simulator (MSS).

clear gdf_data x y z

if ~exist('colorcode')

    
function plot_tecplot(filename,colorcode,figno)
% PLOT_TECPLOT (MSS HYDRO)
%
% Plot Tecplot geometry files (*_pan.dat) for semisubs in 3D
% This file is generated by WAMIT (se example 15)
%
% Examples:
%
% >> plot_tecplot(filename,colorcode,figno);
% >> plot_tecplot('test15_pan','black',1);       % WAMIT Example 15
%
% -------------------------------------------------------------------------
% Inputs:
%    filename:    Wamit generated Techplot file without extension
%    colorcode:   'r','g','b','c','m','y','w','k' or coslormaps [0 0 1] etc.
%    figno:       figure number
%
% -------------------------------------------------------------------------
% Author:    Thor I. Fossen 
% Date:      2005-09-24 
% Revisions: 
% _________________________________________________________________________
%
% MSS HYDRO is a Matlab toolbox for guidance, navigation and control.
% The toolbox is part of the Marine Systems Simulator (MSS).

clear gdf_data x y z

if ~exist('colorcode')
    colorcode = 'black';
end

if ~exist('figno')
    figno = 1;
end


% -------------------------------------------------------------------------
% Read Techplot panels
% -------------------------------------------------------------------------
fid1 = fopen([filename '.dat']);   % open Wamit file

i = 1;
    
while feof(fid1) == 0,

    txt       = char(fgetl(fid1));
    if strcmp(txt(1:4),'zone')
        txt       = char(fgetl(fid1));
    end