【问题标题】:Scatter Plot 2D Matrix in MATLABMATLAB 中的散点图二维矩阵
【发布时间】:2016-05-03 00:15:27
【问题描述】:

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

你能帮我画一下吗?

【问题讨论】:

标签: matlab plot scatter-plot


【解决方案1】:

您想使用find 获取行和列,然后使用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')

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2015-01-17
    • 1970-01-01
    • 1970-01-01
    • 2014-11-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多