Index exceeds matrix dimensions
Mostrar comentarios más antiguos
Hi. I am trying to export some data to a database and I am getting following error message
Index exceeds matrix dimensions.
Error in data2postgresql (line 135)
exportData = {data{k,4}, data{k,2}, data{k,1},
data{k,6}, data{k,7}};
for this code
%%Export data to the database
switch databaseExport
case 0 % no database export
case 1 % export to database
for k = 1:nRows
% sort the imported data and move it into exportData
exportData = {data{k,4}, data{k,2}, data{k,1}, data{k,6}, data{k,7}};
% insert data to the appropriate table and columns of the database
colNames = {'"A"', '"B"', '"C"', '"D"', '"E"'};
fastinsert(conn, exportTable, colNames, exportData);
end
otherwise % no export
end
Some info: nRows is the length of data{:,1} and data is a 1x7 2074487 Bytes cell and exportData is a 1x5 691766 Bytes cell with following entries for k=1, I guess, '001' / 1 / 86399x1 double / [] / []
Do you have any idea why I get a wrong dimension error and how I could fix it? Thank you very much for your help. Best regards
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Signal Operations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!