comparison scripts/plot/refreshdata.m @ 10549:95c3e38098bf

Untabify .m scripts
author Rik <code@nomad.inbox5.com>
date Fri, 23 Apr 2010 11:28:50 -0700
parents 59967776ed4a
children 693e22af08ae
comparison
equal deleted inserted replaced
10548:479536c5bb10 10549:95c3e38098bf
63 endif 63 endif
64 if (nargin < 2) 64 if (nargin < 2)
65 ws = "base"; 65 ws = "base";
66 else 66 else
67 if (!ischar (ws) || !(strcmpi (ws, "base") || strcmpi (ws, "caller"))) 67 if (!ischar (ws) || !(strcmpi (ws, "base") || strcmpi (ws, "caller")))
68 error ("refreshdata: expecting workspace to be \"base\" or ""caller\""); 68 error ("refreshdata: expecting workspace to be \"base\" or ""caller\"");
69 else 69 else
70 ws = tolower (ws); 70 ws = tolower (ws);
71 endif 71 endif
72 endif 72 endif
73 endif 73 endif
74 74
75 h = findall (h); 75 h = findall (h);
90 90
91 for i = 1 : length (objs) 91 for i = 1 : length (objs)
92 for j = 1 : length (props {i}) 92 for j = 1 : length (props {i})
93 expr = get (objs(i), props{i}{j}); 93 expr = get (objs(i), props{i}{j});
94 if (!isempty (expr)) 94 if (!isempty (expr))
95 val = evalin (ws, expr); 95 val = evalin (ws, expr);
96 prop = props{i}{j}(1:end-6); 96 prop = props{i}{j}(1:end-6);
97 if (! isequal (get (objs(i), prop), val)) 97 if (! isequal (get (objs(i), prop), val))
98 set (objs(i), props{i}{j}(1:end-6), val); 98 set (objs(i), props{i}{j}(1:end-6), val);
99 endif 99 endif
100 endif 100 endif
101 endfor 101 endfor
102 endfor 102 endfor
103 endfunction 103 endfunction