查看单个帖子
旧 2019-12-10, 20:41   #1
poster
高级会员
 
注册日期: 2019-11-21
帖子: 3,006
声望力: 66
poster 正向着好的方向发展
帖子 在MATLAB中实现排序行

我的问题与先前解决的问题有关,该问题如何在MATLAB中将数据保存到.txt文件中

我的问题是,我决定sortrows输出进行排序,但是,当我删除sortrows ,会出现此错误--- 'Input files have different number of rows' ,当我离开sortrows 'Input files have different number of rows'也没有错误

我很好奇为什么...与sortrows ?

编辑:除了将B更改为B=A{:}外,我保留了其余代码。



回答:

尽管我没有在另A文章中运行代码,但看起来A是一个单元格数组,而C是一个矩阵。因此,如果要摆脱sortrows ,请尝试将其替换为B=cell2mat(A); 。



更多&回答...
poster 当前离线   回复时引用此帖