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: ui_build.m
    path of file: ./repos/malini/Codes/deconvolution - model/spm8/marsbar-0.44/@mardo_99
    
    the code of the file until where you have to start completion: function D = ui_build(D, dtype)
% method to create / fill design via GUI
% FORMAT D = ui_build(D, dtype)
%
% D      - design object
% dtype  - one of 'PET', 'FMRI', 'Basic')
% 
% Returns
% D      - design object with new design
%

    
function D = ui_build(D, dtype)
% method to create / fill design via GUI
% FORMAT D = ui_build(D, dtype)
%
% D      - design object
% dtype  - one of 'PET', 'FMRI', 'Basic')
% 
% Returns
% D      - design object with new design
%
% $Id$

if nargin < 2
  error('Need design type');
end