필터 지우기
필터 지우기

Obtain data from file header

조회 수: 3 (최근 30일)
MLP
MLP 2021년 5월 24일
댓글: MLP 2021년 5월 24일
Hi! I am writting a code to generate grids and I want to make it as automatic as possible, for this I need to obtain some values regarding the number of nodes and faces which are located in the header of the file. Currently, when I use readmatrix, the code skips everything up to 'end_header'. The values I am trying to get are the ones in lines 5 and 9.
Thank you in advance, I cannot share the code.

답변 (1개)

Sulaymon Eshkabilov
Sulaymon Eshkabilov 2021년 5월 24일
Hi,
In your exercise, two data import functions can be employed. They are fscanf() and textscan() by which you can not only read text headers by also collect valuable info from the text headers using specifiers, such as characters, number types, etc.
Good luck.
  댓글 수: 1
MLP
MLP 2021년 5월 24일
Hi, thank you for the help. I will look more into detail on those two functions, I wans't sure if you could extract specific data with them. I will post the solution when I manage to solve it. Thank you!

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Standard File Formats에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by