我在matlab中有一个128x100的矩阵,其中每一列都应该被视为一个单独的元素。让我们称这个矩阵为M。
我还有另一个128x2000矩阵(称为V),它由矩阵M中的列组成。
如何绘制直方图来映射第二个矩阵中使用的每一列的频率?
hist(double(V),double(M)) gives the error:
Error using histc
Edge vector must be monotonically
non-decreasing.
我应该做些什么?
我有一个脚本从Matlab程序中提取出一系列x,y,z坐标。它们填充一个3列矩阵。然后,我需要将这个矩阵写到一个文本文件中,这样我就有了一个单独程序的坐标文件。写出内容的代码如下:
Coords = crop_points %just a 3 column array with a bunch of x,y,z coords
CoordOutput = fopen('coords.txt', 'a+') %Opening a text file that I will append as I want more than one set of coords ad