Read Text File into a Matrix
Show older comments
I would like to be able to read a text file into matlab and turn it into a matrix. The text file would look like this:
%Joint Properties
% Format is %joint# x_coord y_coord xdof# ydof#
1 0 0 4 5
2 120 0 1 6
3 120 120 2 3
I would like to turn the numbers into a matrix. How would I do this?
Also, how would I then access a single column in this matrix?
Is there a way to have Matlab count the number of rows in the matrix?
Accepted Answer
More Answers (1)
Priya Shaji
on 14 Mar 2018
0 votes
Hi I want to read txt files and plot in matlab using imshow
Categories
Find more on Large Files and Big Data in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!