diff options
author | ttt | 2018-07-09 16:54:44 +0530 |
---|---|---|
committer | ttt | 2018-07-09 16:54:44 +0530 |
commit | e5e316e1958e27696d7670e2492992d34ff38b68 (patch) | |
tree | 8dab5cc24e31921cfb3c44444d48cfbfd3ff76f8 /identTime.sci | |
parent | 681c88404f9f2861d228d0d0c3bd61b200ca1442 (diff) | |
download | FOSSEE-System-Identification-Toolbox-e5e316e1958e27696d7670e2492992d34ff38b68.tar.gz FOSSEE-System-Identification-Toolbox-e5e316e1958e27696d7670e2492992d34ff38b68.tar.bz2 FOSSEE-System-Identification-Toolbox-e5e316e1958e27696d7670e2492992d34ff38b68.zip |
added scilabs files
Diffstat (limited to 'identTime.sci')
-rw-r--r-- | identTime.sci | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/identTime.sci b/identTime.sci new file mode 100644 index 0000000..c4c47c8 --- /dev/null +++ b/identTime.sci @@ -0,0 +1,32 @@ +function varargout = identTime(varargin) + [lhs , rhs] = argn() + if ( rhs <> 1 ) then + errmsg = msprintf(gettext("%s: Wrong number of input arguments"), "identTime"); + error(errmsg) + elseif typeof(varargin(1)) <> "iddata" then + error(msprintf(gettext("%s:Input model must be ""iddata"" type.\n"),"identTime")) + end + plantData = varargin(1) + //disp('yolo') + inputData = plantData.InputData;inputData = size(inputData,'r') + outputData = plantData.OutputData;outputData = size(outputData,'r') + sampleNumb = max(inputData,outputData) + timeData = (0:sampleNumb-1)*plantData.Ts + t = tlist(['identTime','samples','start','end','Frequency','TimeSeries'],sampleNumb,0,timeData($),1/plantData.Ts,timeData) + varargout(1) = t +endfunction + +function %identTime_p(mytlist) + f = fieldnames(mytlist) + mprintf("\t samples : %d\n",mytlist.samples) + mprintf("\t start : %d\n",mytlist.start) + mprintf("\t end : %d\n",mytlist.end) + if ceil(mytlist.Frequency)-mytlist.Frequency then + mprintf("\t Frequency : %.4f\n",mytlist.Frequency) + else + mprintf("\t Frequency : %d\n",mytlist.Frequency) + end + timeData = mytlist.TimeSeries + mprintf("\t TimeSeries : %.2f, %.2f, . ,%.2f",timeData(1),timeData(2),timeData($)) + +endfunction |