Overview
Comment: | Initial revision |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | origin/master | trunk |
Files: | files | file ages | folders |
SHA3-256: |
2062340c6f54da949c70458ecd04febe |
User & Date: | gawthrop@users.sourceforge.net on 1999-09-18 04:23:16 |
Other Links: | branch diff | manifest | tags |
Context
1999-10-11
| ||
05:08:33 | Initial revision check-in: 4e82636bd0 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
1999-09-18
| ||
04:23:16 | Initial revision check-in: 2062340c6f user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
04:20:44 | Added indices - true if corresponding sens fun to be generated. check-in: cd2aed8b41 user: gawthrop@users.sourceforge.net tags: origin/master, trunk | |
Changes
Added mttroot/mtt/bin/trans/m/mtt_sfreq.m version [9ba3b482f5].
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | function [w,y,y_theta] = mtt_sfreq(system_name,theta,indices); ## usage: [t,y,y_theta] = mtt_sfreq(system_name,theta); ## ## Frequency response with name system_name and parameter vector theta ## The order of components in theta is determined in system_numpar.txt: ## y_theta contains the corresponding sensitivity functions ## Assumes system generated by the sBG approach ## Copyright (C) 1999 by Peter J. Gawthrop ## $Id$ ## Assumes SISO system global mtt_n_parameters mtt_parameters # Global "argc argv" if nargin<3 indices = ones(size(theta)); endif N = length(theta); if N!=length(indices) error(sprintf("The length (%i) of indices must be the same as that of theta (%i)",length(indices),N)); endif eval(sprintf("%s_simpar;", system_name)); # Read the "simulation" parameters w = logspace(mttwmin,mttwmax,mttwsteps)'; # Frequency range y_theta = []; mtt_n_parameters = 2*N; mtt_parameters(2:2:2*N) = theta; # The actual parameters for i = 1:N if indices(i) mtt_parameters(1:2:2*N-1) = 0; # The sensitivity switches are off mtt_parameters(2*i-1) = 1; # Set the approriate sensitivity switch # on eval(sprintf("%s_numpar;", system_name)); # Read the parameters eval(sprintf("[A,B,C,D,E] = %s_dm;", system_name)); # Evaluate the descriptor matrices fr = dm2fr(A,B,C,D,E,w); y_theta = [y_theta fr(:,2)]; # Sensitivity frequency response endif endfor y = fr(:,1); # Actual frequency response endfunction |