0001 function atDisplayVariableChange(ring1,ring2,Variables)
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024 disp('Final variable values:')
0025 disp(' ')
0026 disp('Name field before after variation')
0027 ok=arrayfun(@(v) dispv(v,ring1,ring2),Variables);
0028 disp(' ')
0029 disp('-----oooooo----oooooo----oooooo----')
0030 disp(' ')
0031
0032 function ok=dispv(Variable,ring1,ring2)
0033 if isa(Variable.Indx,'function_handle')
0034 funcname=sprintf('%-20.20s',func2str(Variable.Indx));
0035 for i=1:length(Variable.Parameter)
0036 fprintf('%-23.23s %8g %8g %8g\n',...
0037 funcname,Variable.Parameter(i),0,0);
0038 end
0039 else
0040 ok=cellfun(@(elem1,elem2) dd(elem1,elem2,Variable.Parameter),...
0041 ring1(Variable.Indx),ring2(Variable.Indx));
0042 end
0043 ok=0;
0044 end
0045
0046 function ok=dd(elem1,elem2,Parameter)
0047 value1 = getfield(elem1,Parameter{:});
0048 value2 = getfield(elem2,Parameter{:});
0049 fprintf('%-10.10s %-12.12s %8g %8g %8g\n',...
0050 elem1.FamName,Parameter{1},value1,value2,(value2-value1));
0051 ok=0;
0052 end
0053 end