Prev: wilmofloyd@gmail.com
Next: errordlg multiple lines
From: Carolyn on 15 Jul 2010 16:15 Walter Roberson <roberson(a)hushmail.com> wrote in message <i1nivl$m45$2(a)canopus.cc.umanitoba.ca>... > Carolyn wrote: > > > case 4 > > g_anon = @(vec) [g{1}(vec) g{2}(vec) g{3}(vec) g{4}(vec)]; > > This might replace the complete switch and so on: > > g_anon = @(vec) cellfun(@(G) G(vec), g); This worked and cleaned up my code considerably. Thanks. Now I am just looking for suggestions on how to make a list of symbolic variables of indefinite length.
From: Walter Roberson on 15 Jul 2010 16:20 Carolyn wrote: > Walter Roberson <roberson(a)hushmail.com> wrote in message > <i1nivl$m45$2(a)canopus.cc.umanitoba.ca>... >> Carolyn wrote: >> >> > case 4 >> > g_anon = @(vec) [g{1}(vec) g{2}(vec) g{3}(vec) g{4}(vec)]; >> >> This might replace the complete switch and so on: >> >> g_anon = @(vec) cellfun(@(G) G(vec), g); > > This worked and cleaned up my code considerably. Thanks. Now I am just > looking for suggestions on how to make a list of symbolic variables of > indefinite length. for i = 1:Ncurr rvarlist{i} = sym(sprintf('r%d', i)); end
From: Carolyn on 16 Jul 2010 10:22 This solved my problem! Much obliged! > for i = 1:Ncurr > rvarlist{i} = sym(sprintf('r%d', i)); > end
|
Pages: 1 Prev: wilmofloyd@gmail.com Next: errordlg multiple lines |