我是R用户:我不使用Matlab。但是,我正在使用Broad Institute的一个名为“hg18_with_miR_20080407.mat”的基因组文件。你可以找到它的位置:http://genepattern.broadinstitute.org/ftp/distribution/genepattern/dev_archive/GISTIC/broad.mit.edu:cancer.software.genepattern.module.analysis/00125/1.1/如何将matlab结构体打印到文本文件中?
我尝试使用R包R.matlab(表< - readMat( “〜/桌面/ hg18_with_miR_20080407.mat”)),但它会持续在明确。因此,因为我今天需要这个文件,所以我用一个朋友的计算机与Matlab。我有一个结构< 1x26835>称为RG 每个变量具有以下值:
refseq 'NM_003585'
gene 'double C2...'
symb 'DOC2B'
locus_id 8447
...
有没有办法,我可以打印出每个条目到一个文本文件,我可以很容易地解析的方法吗?有没有更好的办法?我正在阅读Matlab文档,但是如果有人可以给我一行代码,我会很感激。如果不可能,我怎样才能搜索每个变量的特定基因入门?我不断收到错误。例如:
find(rg == 'Met')
Error: The expression to the left of the equals sign is not a valid target for an assignment.
谢谢!
关于您遇到的特定错误,可能是因为您无法在结构体上运行find。 – Trogdor 2014-10-27 17:29:16