How to get a matrix into matLab from a txt file

3 vues (au cours des 30 derniers jours)
Bruno
Bruno le 6 Déc 2012
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 commentaires
Walter Roberson
Walter Roberson le 6 Déc 2012
The lines that you do want, what format are they, and which parts of them do you want read in as data?
Jan
Jan le 6 Déc 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?

Connectez-vous pour commenter.

Réponses (0)

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by