【问题标题】:trouble importing csv file in matlab to perform pca在 matlab 中导入 csv 文件以执行 pca 时遇到问题
【发布时间】:2016-04-02 19:11:21
【问题描述】:

我有一个问题,当我将 CSV 数据集导入 Matlab 时,分隔符不起作用,Matlab 在一列中显示所有内容 this is a picture of the problem

【问题讨论】:

  • 你是如何加载数据集的?
  • 使用导入向导

标签: matlab csv dataset pca


【解决方案1】:

使用

data = dlmread('path/to/filename', ',');

如果您希望将数据作为表格(这很方便),请使用

data = readtable(('path/to/filename', 'delimiter', ',', 'readvariablenames', true);

每一项都假定您的数据格式正确。也就是长方形,列的类型一致

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-06-28
    • 2011-04-10
    • 1970-01-01
    • 2021-04-23
    • 2019-02-20
    • 1970-01-01
    相关资源
    最近更新 更多