DISPLAY display a zero %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% DESCRIPTION: DISPLAY display a zero VERSION: $Id: display.m,v 1.2 2007/07/18 13:58:45 ingo Exp $ HISTORY: 30-01-2007 Hewitson Creation %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
0001 function display(p) 0002 % DISPLAY display a zero 0003 % 0004 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0005 % 0006 % DESCRIPTION: DISPLAY display a zero 0007 % 0008 % VERSION: $Id: display.m,v 1.2 2007/07/18 13:58:45 ingo Exp $ 0009 % 0010 % HISTORY: 30-01-2007 Hewitson 0011 % Creation 0012 % 0013 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 0014 0015 for i=1:length(p) 0016 banner = sprintf('---- zero %d ----', i); 0017 disp(banner); 0018 0019 % get key and value 0020 name = get(p(i), 'name'); 0021 f = get(p(i), 'f'); 0022 q = get(p(i), 'q'); 0023 ri = get(p(i), 'ri'); 0024 0025 % display 0026 if ~isempty(f) 0027 if q > 0.5 0028 disp([ sprintf('%s: %g Hz, Q=%g [', name, f, q) num2str(ri(1)) ']']); 0029 else 0030 disp(sprintf('%s: %g Hz', name, f)) 0031 end 0032 end 0033 0034 bannerEnd = []; 0035 while length(bannerEnd) < length(banner) 0036 bannerEnd = [bannerEnd '-']; 0037 end 0038 disp(bannerEnd); 0039 0040 end 0041 0042 0043