function [ abs, phase ] = mnbode_list( sys, freq, varargin ) %mnbode_list make gain, phase list of system with frequency list % [abs, phase] = mnbode_list(sys,freq) % if you want complex list of bode list of sys, put option 'complex' or 'c' % then this function output complex bode list on abs. [temp_abs,temp_phase] = bode(sys,freq*2*pi); abs = squeeze(temp_abs); phase = squeeze(angle(exp(1i*temp_phase*pi/180)))*180/pi; if ismember('complex',varargin)||ismember('c',varargin) abs = abs.*exp(1i*phase*pi/180); end end