MATLAB 中的散点图二维矩阵

Scatter Plot 2D Matrix in MATLAB

我的(单个)3430X6906 矩阵只有零和一,我想散点图。假设我在第 30 列和第 40 行 1,绘图应该在点 (30,40) 上有 dot

你能帮我画一下吗

您想使用 find and then plot these using plot 获取行和列。

%// Create artificial data
data = rand(3430, 6906) > 0.99999;

%// Find the location of the ones
[row, col] = find(data);

%// Plot these locations
plot(col, row, 'o')