converting to a matrix

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 日

0 投票

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.

この質問は閉じられています。

タグ

質問済み:

2014 年 4 月 2 日

閉鎖済み:

2021 年 8 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by