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: QuadPlot.m
    path of file: ./repos/hongbomiao.com/aerospace/quadcopter-pd-controller/utils
    
    the code of the file until where you have to start completion: classdef QuadPlot < handle
    % Visualization class for quad

    properties (SetAccess = public)
        k = 0
        qn              % quad number
        time = 0        % time
        state           % state
        des_s
    
function UpdateDesiredQuadState(Q, des_state)
            Q.des_state = des_state;
        end

        % Update quad history
        function UpdateQuadHist(Q)
            Q.k = Q.k + 1;
            Q.time_hist(Q.k) = Q.time;
            Q.state_hist(:, Q.k) = Q.state(1:6);
            Q.state_des_hist(:, Q.k) = Q.des_state(1:6);
        end

        % Update motor position
        function UpdateMotorPos(Q)
            Q.motor = calculatePos(Q.state(1:3), Q.rot, Q.wingspan, Q.height);
        end