Reputation: 815
I have an Excel spreadsheet which depicts a binary adjacency matrix in the form shown below (with about a 1000 nodes):-
I wish to create the same adjacency matrix in MATLAB out of this Excel file. However, I'm a beginner in MATLAB. Could someone help me out with this?
Upvotes: 0
Views: 4731
Reputation: 4273
There are several ways to read a matrix from an Excel file into Matlab. If it's something you only need to do once, the best way is probably just the copy-and-paste method. If you need to do things programmatically, you probably want to use xlsread
. Here's some documentation of both methods (and a couple of others) from the company's website:
http://www.mathworks.com/help/matlab/import_export/ways-to-import-spreadsheets.html
Upvotes: 3