Select only some coordinates from a .txt file
1 visualizzazione (ultimi 30 giorni)
Mostra commenti meno recenti
Hi!
I have the filename.txt file representing the coordinates of the nodes.
I have a nodes.txt file that represents the row I want to keep within the filename.txt file.
How can I locate the nodes I want?
For example:
the number 1 in the nodes.txt file represents the coordinate (307, 55) of the filename.txt file
the number 26 in the nodes.txt file represents the coordinate (308, 45) of the filename.txt file
and so on...
I want to bring back to the workspace only the coordinates of interest.
0 Commenti
Risposta accettata
David Hill
il 1 Dic 2022
n=readmatrix('nodes.txt');
m=readmatrix('filename.txt');
newMatrix=m(n,:)
2 Commenti
Più risposte (0)
Vedere anche
Categorie
Scopri di più su Spreadsheets in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!