How to get a matrix into matLab from a txt file
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have .txt file with lot of data, tex and numbers. When I open the .txt on matLab i get 63630 lines. Starting arround line 1200 until 63630 I have a matriz on that file. Using that matrix I have to create a image.
To create the image I've done this:
image(matriz,'CDataMapping','scaled'); colormap(gray);
but I'm not able to define the variable 'matriz' from the .txt file, can someone explain me how I can choose and say to matLab that those specific line are suposed to be a matrix?
2 Kommentare
Walter Roberson
am 6 Dez. 2012
The lines that you do want, what format are they, and which parts of them do you want read in as data?
Jan
am 6 Dez. 2012
A summary: You want to import the lines 1200 to 63630 from a text file to a matrix. Correct? Please post one of these lines, wuch that we can see the format.
What have you tried so far and which problems occurred?
Antworten (0)
Siehe auch
Kategorien
Mehr zu Image Preview and Device Configuration finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!