How do I create a for loop to extract data from table?
古いコメントを表示
Hii,
I have this table with a lot of data that i need to reorganize. This table consists of data from 9 participants, i want to have all the reaction times in 1 column per videostring, so every ID will have its own row with reactiontimes. In total i have 18 different videostrings, so the matrix will be [9,18]. However, i dont have some missing data, which means that for some videostrings i dont have any response times, here i need to have NaN or something else... See the attachment: dimensions are 159x3 while it should be 162x3 meaning that i miss 3 results. I really get stuck by trying to fix this.
How the matrix should look
(ID) 02stop.mp4 74524driving.mp4 .... (18 videostrings in total)
1 10672 11143 ....
2 198 7220 .....
3 10846 NaN ....
4 ... ...
....
I only got this far...:(
%%
ReactionTime = cat(2,resultsehmitrials(:,3),resultsehmitrials(:,5),resultsehmitrials(:,2)); %1 = videonames 2 = responsetime 3 = participant ID creates the Reactiontimetable
AnswersParticipants = NaN(9,18);
for nParticipanten = 1 : 9
for nVideos = 1 : 18
If someone could help me with to get started with this for loop I would be really thankfull!
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Matrices and Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!