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: hardwareContinuousVoltage.m
    path of file: ./repos/MATLAB_DAQmx_examples/code/+vidrio/+AI
    
    the code of the file until where you have to start completion: function hardwareContinuousVoltage(fname)
    % A simple example showing hardware-timed continuous analog input using the Vidrio dabs.ni.daqmx wrapper
    %
    % function vidrio.AI.hardwareContinuousVoltage
    %
    % Purpose
    % Demonstrates how to do hardware-timed continuous analog input using Vidrio's dabs.ni.daqmx wrapper. 
    % This function continuously acquires data from multiple channels and plots the results to screen as
    % the data come in. Plotting is achieved in a very simple way with repeated call to plot in a while loop.
    % The example uses the card's on-board clock but uses no triggers. We optionally save data to a text file.
    % Note that in "real" situations we'd likely want to use a binary format rather than ASCII. 
    %
    %
    % Inputs
    % fname - Relative path to file to which data will be written as a CSV file. 
    %         If missing or empty, nothing is written to disk. 
    %
    %
    % Demonstrated steps:
    %    1. Create a task.
    %    2. Create multiple Analog Input voltage channels.
    %    3. Set the sample rate, define the sample mode to be continuous.
    %    4. Call the Start function.
    %    5. Read in the data continuously in a while loop, optionally saving to disk.
    %    6. Clear the task
    %    7. Display an error if any.
    %
    %
    % Examples
    % >> vidrio.AI.hardwareContinuousVoltage
    % >> vidrio.AI.hardwareContinuousVoltage('myOutput.csv')
    %
    % The to read the data:
    % >> T=textread('myOutput.csv','','delimiter',',');
    % >> figure
    % >> plot(T)
    %
    % 
    % Rob Campbell - Basel, 2017
    %
    % 
    % Also see:
    % Vidrio example: dabs.ni.daqmx.demos.AnalogInput.Voltage_Continuous_Input
    % The following examples are similar but use a callback function to plot the data:
    % TMW DAQ Toolbox example: daqtoolbox.AI.analogInput_Continuous
    % ANSI C: DAQmx_ANSI_C_examples/AI/ContAcq-IntClk.c 

    
function hardwareContinuousVoltage(fname)
    % A simple example showing hardware-timed continuous analog input using the Vidrio dabs.ni.daqmx wrapper
    %
    % function vidrio.AI.hardwareContinuousVoltage
    %
    % Purpose
    % Demonstrates how to do hardware-timed continuous analog input using Vidrio's dabs.ni.daqmx wrapper. 
    % This function continuously acquires data from multiple channels and plots the results to screen as
    % the data come in. Plotting is achieved in a very simple way with repeated call to plot in a while loop.
    % The example uses the card's on-board clock but uses no triggers. We optionally save data to a text file.
    % Note that in "real" situations we'd likely want to use a binary format rather than ASCII. 
    %
    %
    % Inputs
    % fname - Relative path to file to which data will be written as a CSV file. 
    %         If missing or empty, nothing is written to disk. 
    %
    %
    % Demonstrated steps:
    %    1. Create a task.
    %    2. Create multiple Analog Input voltage channels.
    %    3. Set the sample rate, define the sample mode to be continuous.
    %    4. Call the Start function.
    %    5. Read in the data continuously in a while loop, optionally saving to disk.
    %    6. Clear the task
    %    7. Display an error if any.
    %
    %
    % Examples
    % >> vidrio.AI.hardwareContinuousVoltage
    % >> vidrio.AI.hardwareContinuousVoltage('myOutput.csv')
    %
    % The to read the data:
    % >> T=textread('myOutput.csv','','delimiter',',');
    % >> figure
    % >> plot(T)
    %
    % 
    % Rob Campbell - Basel, 2017
    %
    % 
    % Also see:
    % Vidrio example: dabs.ni.daqmx.demos.AnalogInput.Voltage_Continuous_Input
    % The following examples are similar but use a callback function to plot the data:
    % TMW DAQ Toolbox example: daqtoolbox.AI.analogInput_Continuous
    % ANSI C: DAQmx_ANSI_C_examples/AI/ContAcq-IntClk.c 
    % vidrio.AI.hardwareContinuousVoltageWithCallBack
    % PyDAQmx: https://pythonhosted.org/PyDAQmx/callback.html

    %Define a cleanup function
    tidyUp = onCleanup(@cleanUpFunction);

    if nargin<1
        fname=[];
    end