How to make a list of iddata objects
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Bill Tubbs
le 22 Mar 2020
Réponse apportée : Bill Tubbs
le 22 Mar 2020
I'm loading data from a bunch of csv files and making each one into a iddata object.
How do I create a collection from the resulting iddata objects?
Code snippet:
% Store data sets in this cell array
dataSets = {};
% Loop through files
for k = 1 : length(theFiles)
file = theFiles{1, k};
fprintf(1, "Reading file '%s'\n", file.name);
filePath = fullfile(file.folder, file.name);
% Read data from file
dataTable = readtable(filePath);
% Create dataset object for system identification
inputData = table2array(dataTable(:,2:3));
outputData = table2array(dataTable(:,4:5));
dataSet = iddata(outputData,inputData);
dataSets = [dataSets, dataSet];
end
The line
dataSets = [dataSets, dataSet];
generates this error message:
Undefined function 'realdata' for input arguments of type 'cell'.
Error in iddata/horzcat (line 19)
reald = realdata(dat);
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Data Preparation Basics dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!