Select only some coordinates from a .txt file
조회 수: 1 (최근 30일)
이전 댓글 표시
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
채택된 답변
David Hill
2022년 12월 1일
n=readmatrix('nodes.txt');
m=readmatrix('filename.txt');
newMatrix=m(n,:)
댓글 수: 2
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Standard File Formats에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!