필터 지우기
필터 지우기

Combine variables in workspace into one table?

조회 수: 16 (최근 30일)
Katrina Anderson
Katrina Anderson 2018년 9월 6일
답변: Peter Perkins 2018년 9월 7일
Hi, I have a workspace that has 50+ variables I have calculated such as movmean for 9 axis of data, mov median.. etc [1048575x1 double] and I would like to combine them into one table. Or at least combine some?
Is this possible?
(I am trying to classify behaviour from the data)
Thankyou!
  댓글 수: 2
Stephen23
Stephen23 2018년 9월 6일
This might be relevant:
How did you get all of those variables into the workspace?
Katrina Anderson
Katrina Anderson 2018년 9월 6일
Thankyou for your help.
I will looking to that link.
I am calculating a 1 second window for each signal (Acc x Acc y gyro xyz magxyz and resultants) so thats 12 signals.. and for each one I am calculating mean median range std, etc. Im not sure if there is an easier way to do this so can have them automatically calculate in one table? haha
Thanks

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

채택된 답변

ahmed nebli
ahmed nebli 2018년 9월 6일
편집: Stephen23 2018년 9월 6일
  댓글 수: 1
Stephen23
Stephen23 2018년 9월 7일
Note that this answer creates an outdated dataset array, which are not recommended. The linked page states clearly to use tables instead: "The dataset data type might be removed in a future release. To work with heterogeneous data, use the MATLAB® table data type instead. See MATLAB table documentation for more information."

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

추가 답변 (1개)

Peter Perkins
Peter Perkins 2018년 9월 7일
If you created those variables in the workspace, surely you could have created them in a table to begin with?
t = table();
t.SomeVarName = fun(something)
If you really have 50 variables in the workspace, then you will need to call the table constructor and list them all out as inputs. If they were in a cell array you could do this
t = table(c{:})

카테고리

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