Info

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

converting to a matrix

조회 수: 1 (최근 30일)
R yan
R yan 2014년 4월 2일
마감: MATLAB Answer Bot 2021년 8월 20일
I have a tab separated text file with columns user_iD movie_Id ratings time. I want to create a matrix where the (i,j) entry is rating by user i for the movie j. there are 100,000 ratings from 1000 users on 1700 movies.
196 242 3 881250949
186 302 3 891717742
22 377 1 878887116
244 51 2 880606923
166 346 1 886397596

답변 (1개)

Niklas Nylén
Niklas Nylén 2014년 4월 2일
data = importdata('file.txt')
  댓글 수: 1
R yan
R yan 2014년 4월 3일
thank you. that creates a matrix with the same format as given in the file. how to create a matrix where the (i,j) entry is rating by user i for the movie j.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by