~ubuntu-branches/ubuntu/utopic/octave-control/utopic

« back to all changes in this revision

Viewing changes to inst/ncfsyn.m

  • Committer: Package Import Robot
  • Author(s): Sébastien Villemot
  • Date: 2014-06-28 18:56:48 UTC
  • mfrom: (16.1.3 sid)
  • Revision ID: package-import@ubuntu.com-20140628185648-p4tzt68408to4lxo
Tags: 2.6.5-1
* Imported Upstream version 2.6.5
* Uploaders: add Rafael Laboissiere and Mike Miller, remove Thomas Weber.

Show diffs side-by-side

added added

removed removed

Lines of Context:
266
266
 
267
267
## Author: Lukas Reichlin <lukas.reichlin@gmail.com>
268
268
## Created: July 2011
269
 
## Version: 0.2
 
269
## Version: 0.3
270
270
 
271
271
function [K, varargout] = ncfsyn (G, W1 = [], W2 = [], factor = 1.0)
272
272
 
343
343
    if (m == s && p == s)      # model is of correct size
344
344
      return;
345
345
    elseif (m == 1 && p == 1)  # model is SISO
346
 
      tmp = W;
347
 
      for k = 2 : s
348
 
        W = append (W, tmp);   # stack SISO model s times
349
 
      endfor
 
346
      tmp = cell (s, 1);
 
347
      tmp(1:s) = W;
 
348
      W = append (tmp{:});     # stack SISO model s times
350
349
    else                       # model is invalid
351
350
      error ("ncfsyn: %s must have 1 or %d inputs and outputs", inputname (1), s);
352
351
    endif