Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

read data from R

조회 수: 2 (최근 30일)
chu
chu 2014년 5월 30일
마감: chu 2014년 12월 1일
Hello, I have a question concerning reading data from R. In R, the data is written as follows x[[i]]$data, i varies from 1 to 10000. I know that one can use the writeMat function to write the variables in R to *.mat file, however, the function requires to indicate the name of the variables. I simply can not do that 10000 times. My expected results in matlab should look like matdata{i} (with matdata{i}= x[[i]]$data, i=1,...,10000). Any suggestion is welcome. Thank you in advance. best regards. Chu
  댓글 수: 2
dpb
dpb 2014년 5월 30일
I don't know R but if the syntax x[[i]]$data is indicating variables of form x1, x2, ..., xN, then the answer is "don't do that" in Matlab. Use cell arrays or named structure fields or somesuch. See the FAQ for why not and alternatives..
chu
chu 2014년 6월 12일
thank you very much for this good practice. cheers.

답변 (0개)

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by