Import parts of large comma decimal txt file

조회 수: 2 (최근 30일)
Jørgen Fone Pedersen
Jørgen Fone Pedersen 2021년 3월 4일
답변: Jeremy Hughes 2021년 3월 4일
I need to import parts of a large txt file that looks like this:
I only want the numbers in a period decimal format.
How is the best way to do this? Have tried readtable, but it think the comma is a seperator and i only get the decimal points.
I have attached a reduced size copy of the .txt file.

채택된 답변

Jeremy Hughes
Jeremy Hughes 2021년 3월 4일
You can try this after R2020a
readtable(filename,'DecimalSeparator',',')
or earlier
opts = detectImportOptions(filename,'DecimalSeparator',',');
readtable(filename,opts)

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Workspace Variables and MAT Files에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by