itaTransferPath.m 2.21 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81
classdef itaTransferPath %< handle

% <ITA-Toolbox>
% This file is part of the application TPA-TPS for the ITA-Toolbox. All rights reserved. 
% You can find the license for this m-file in the application folder. 
% </ITA-Toolbox>

    
    properties(Access = private)
        mType            = 'airborne'; %input/output
    end
    properties(Dependent = true, Hidden = false)
        type
    end
    
    properties
        name            = '';

        amplification   = '0dB';
        signal          = itaAudio;
        Zs              = [];
        Zr              = [];
        TP              = itaAudio;
        fourpole        = [];
    end
    
    %% **************************************************************
    methods
        %% constructor
        
        
        function disp(this)
            disp(['****************** itaTransferPath *****************'])
            disp([' Name: ' this.name]);
            disp([' Type: ' this.type]);
            if ~isempty(this.signal)
                cdisp('green',['Signal: ' this.signal.comment]);
            else
                cdisp('red',['Signal: ' 'not specified']);
            end
            
            if strcmpi(this.type,'structure-borne')
            if ~isempty(this.signal)
                cdisp('green',['Zs: ' this.Zs.comment]);
            else
                cdisp('red',['Zs: ' 'not specified']);
            end
            
            if ~isempty(this.signal)
                cdisp('green',['Zr: ' this.Zr.comment]);
            else
                cdisp('red',['Zr: ' 'not specified']);
            end
            
            if ~isempty(this.signal)
                cdisp('green',['fourpole: ' fourpole.signal.comment]);
            else
                cdisp('red',['fourpole: ' 'not specified']);
            end
            
            end
            if ~isempty(this.TP)
                cdisp('green',['TP: ' this.TP.comment]);
            else
                cdisp('red',['TP: ' 'not specified']);
            end
            
        end
        
        function res = get.type(this)
            res = this.mType;
        end
        
        function this = set.type(this,value)
            this.mType = value;
        end
    end

    
    
end