Info

This question is closed. Reopen it to edit or answer.

converting to a matrix

1 view (last 30 days)
R yan
R yan on 2 Apr 2014
Closed: MATLAB Answer Bot on 20 Aug 2021
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

Answers (1)

Niklas Nylén
Niklas Nylén on 2 Apr 2014
data = importdata('file.txt')
  1 Comment
R yan
R yan on 3 Apr 2014
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.

This question is closed.

Tags

Community Treasure Hunt

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

Start Hunting!