Using fscanf to make a matrix from text file?


1 Comment
Answers (1)
2 Comments
"So if I wanted to change the format of an individual column, would i have to separate it into a column vector, and then change the format of that vector?"
No, because you cannot "change the format of that vector": numeric vectors do not contain any formatting information whatsoever, so you cannot change what does not exist. Formatting is a feature of the command window, and solely affects how data is displayed. If you want to display particular data with a particular format, then change the format: any data displayed after that will use that format, until you change it again.
Changing the format is not the only way to control how data looks like: if you want more control then you will need to write your own displaying routine using fprintf.
Categories
Find more on Characters and Strings 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!