Transform table values into variable

조회 수: 7 (최근 30일)
Marianne Broeker . 2020년 9월 17일
편집: Deepak Meena . 2020년 9월 22일
Hello!
I have a 4x33 table (4 participants and 33 variables). Now I want to:
• make plots/histgram for just one participant at a time
• for the x-axis, take 3 values (from 3 different variables, although they all measure RT (reaction time)
• for the y-axis, take 3 values (from 3 different variable, they all measure true positives in task).
I extracted two subtables:
T1 = LNBtableS1(1:1,[21 24 27])
T2 = LNBtableS1(1:1,[19 22 25])
How can I combine them in either one table that I then can plot a histogram from, OR convert the three values of T1 and T2 into two variables that I can then combine in a histogram?
Many thanks!
Marianne
댓글 수: 1이전 댓글 -1개 표시이전 댓글 -1개 숨기기
Deepak Meena 2020년 9월 22일
편집: Deepak Meena 님. 2020년 9월 22일
Hi Marianne ,
You can solve using the JOIN function as Sai Sri mentioned in answer or you can also do this
var = LNBtableS1.Variables;
x = var(1,[21 24 27]);%x will contain values needed for x axis
y = var(1,[19 22 25]);%y will contain the values needed for y axis
plot(x,y);
This create plot for first participant and similarly you can do this for all participant.

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

답변 (1개)

Sai Sri Pathuri 2020년 9월 22일
You may use join function to combine two tables.
Here is the link to documentation of join function: https://in.mathworks.com/help/matlab/ref/table.join.html

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

카테고리

Help CenterFile Exchange에서 Noncentral t Distribution에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by