从第二行读取csv并创建输出

时间:2019-07-27 07:24:26

标签: matlab output

我希望从csv存档中仅读取一列。问题是我想从第二行并使用以下命令来阅读本专栏:

*/


var randomlinks=new Array()

randomlinks[0]="www.Link 1.com"
randomlinks[1]="www.Link 2.com"
randomlinks[2]="www.Link 3.com"
randomlinks[3]="www.Link 4.com"
randomlinks[4]="www.Link 5.com"

function randomlink(){
window.location=randomlinks[Math.floor(Math.random()*randomlinks.length)]
}
//-->
</script>
<form method="post">
<center><p><input type="button" name="B1" value="Start survey here" onclick="randomlink()"></p> </form></center>

它是从第一行开始读取的。

此外,我想创建一个矩阵,该矩阵将包含Matlab代码中来自逗号(等式)的两列。

1 个答案:

答案 0 :(得分:0)

xlsread被MathWorks弃用。将来尝试使用readtable。

对于您的原始问题,我假设您想从第二行开始阅读第四列中的所有内容。如果是这样,则您的第二行是错误的:

name = tex(2:end,4)

没有更多示例代码,我无法回答您其余的问题。添加一些细节,我会看到我能做什么。

相关问题