필터 지우기
필터 지우기

How to complile data with two different time steps

조회 수: 1 (최근 30일)
krai
krai 2018년 6월 7일
댓글: krai 2018년 6월 7일
I have a data set like,
time1- 0.0 0.2 0.4 0.6 , exp1 - 110 123 126 128, time2 - 0.1 0.2 0.3 0.4 0.5 0.6, exp2 - 569 587 598 562 698 587
now I want to compile the data to a single sheet with same time step as shown below time 0.2 0.4 0.6, exp1 123 126 128, exp2 587 562 587. how can this be done? thanks in advance..
  댓글 수: 2
Walter Roberson
Walter Roberson 2018년 6월 7일
Could you confirm that what you have is a file or character vector that has exactly one line similar to 'time1- 0.0 0.2 0.4 0.6 , exp1 - 110 123 126 128, time2 - 0.1 0.2 0.3 0.4 0.5 0.6, exp2 - 569 587 598 562 698 587' ?
Or are there multiple lines? Or are there multiple columns each with a header?
krai
krai 2018년 6월 7일
These are multiple columns each with a header (time1, exp1, time2, exp2)

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

채택된 답변

Akira Agata
Akira Agata 2018년 6월 7일
Like this?
% Arrange your data to tables
time1 = [0.0 0.2 0.4 0.6]';
exp1 = [110 123 126 128]';
time2 = [0.1 0.2 0.3 0.4 0.5 0.6]';
exp2 = [569 587 598 562 698 587]';
T1 = table(time1,exp1);
T2 = table(time2,exp2);
% Merge T1 and T2 using innerjoin function
T = innerjoin(T1,T2,'LeftKeys','time1','RightKeys','time2');

추가 답변 (0개)

카테고리

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

태그

Community Treasure Hunt

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

Start Hunting!

Translated by