필터 지우기
필터 지우기

How to read specific columns of a Txt file and store them in an array?

조회 수: 3 (최근 30일)
I need to calcilate from coloum 4, initial data : row 1 coloum 4........... the from initial data i need to subtrct others data from coloum . then save the data . For better understnding. i have upload two photo. Please help me to solve this problem.

채택된 답변

Star Strider
Star Strider 2021년 3월 12일
Try this:
T1 = readtable('Data.txt','HeaderLines',1);
T1.Properties.VariableNames = {'t', 'vd', 'zd', 'mdro'};
T1.mdro = T1.mdro-T1.mdro(1);
and:
FirstFiveRows = T1(1:5,:)
produces:
FirstFiveRows =
t vd zd mdro
_____ _______ __________ ________
0 -10 0.00012 0
1e-07 -9.9908 0.000119 -3.7e-11
2e-07 -9.9704 0.000118 -5.4e-11
3e-07 -9.9576 0.00011701 -6.6e-11
4e-07 -9.924 0.00011601 -7.4e-11
.
  댓글 수: 4

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Tables에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by