select/save part of database into another database
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
addy fang
am 17 Jul. 2020
Kommentiert: addy fang
am 19 Jul. 2020
I have database A of four columns: a, b, c, d, and want to save those rows of d values of less than -10 into another database B. How can I do it?
2 Kommentare
Akzeptierte Antwort
Mohammad Sami
am 17 Jul. 2020
I assume you are able to read the excel directly using the readtable function.
% excelfilepath = 'C:\...';
% DBA = readtable(excelfilepath);
DBB = DBA(DBA.d < -10,:);
% exceloutpath = 'C:\....';
% writetable(DBB,exceloutpath);
3 Kommentare
Mohammad Sami
am 17 Jul. 2020
"2" in y.2 is not a valid vairable or column name. If y is a table see what is the column name.
If y is a matrix, use
z1=y(y(:,2)<-10, :);
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Database Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!