select/save part of database into another database
1 次查看(过去 30 天)
显示 更早的评论
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 个评论
采纳的回答
Mohammad Sami
2020-7-17
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 个评论
Mohammad Sami
2020-7-17
"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, :);
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Database Toolbox 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!