Mercurial > forge
changeset 9417:36a7360cccc2 octave-forge
control: replace num2cell + cellfun by arrayfun (arrayfun became an oct-file in octave 3.6.0) (2)
author | paramaniac |
---|---|
date | Thu, 09 Feb 2012 17:47:18 +0000 |
parents | c6356bcda43c |
children | d5e100fe4b22 |
files | main/control/inst/@frd/__freqresp__.m |
diffstat | 1 files changed, 3 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/main/control/inst/@frd/__freqresp__.m Thu Feb 09 17:41:11 2012 +0000 +++ b/main/control/inst/@frd/__freqresp__.m Thu Feb 09 17:47:18 2012 +0000 @@ -1,4 +1,4 @@ -## Copyright (C) 2010 Lukas F. Reichlin +## Copyright (C) 2010, 2012 Lukas F. Reichlin ## ## This file is part of LTI Syncope. ## @@ -20,7 +20,7 @@ ## Author: Lukas Reichlin <lukas.reichlin@gmail.com> ## Created: October 2010 -## Version: 0.1 +## Version: 0.2 function H = __freqresp__ (sys, w, resptype = 0, cellflag = false) @@ -28,8 +28,7 @@ if (! isempty (w)) # freqresp (frdsys, w), sigma (frdsys, w), ... tol = sqrt (eps); - w = num2cell (w); # use oct-file cellfun instead of m-file arrayfun - w_idx = cellfun (@(x) find (abs (w_sys - x) < tol), w, "uniformoutput", false); + w_idx = arrayfun (@(x) find (abs (w_sys - x) < tol), w, "uniformoutput", false); w_idx = vertcat (w_idx{:}); ## NOTE: There are problems when cellfun uses "uniformoutput", true