How to create a new parameter in one table based on multiple observations in a second table?
이전 댓글 표시
Hi everyone,
I have two tables:
- Basic patient info, incluing a numericar identifier, in which each patient has one row.
- Daily patient data, in which each patient (with the same ID) has multiple rows, each one for each day of observation. Coloum 1 is the ID, 2 is the date and 3 and on are events as true/false.
I am trying to create a new parameter in table 1 that will ask if the patient had an event (for example any of the rows of patient 1 on column 3 = true), and a second parameter that will have the earliest date in which that event happened.
I tryed different approached including splitapply and for loop, but cannot get the correct input.
Would really appreciate the help!
Thanks.
댓글 수: 2
Athrey Ranjith Krishnanunni
2021년 1월 6일
Could you explain more about what you mean by "creating a parameter" in a table, in the context of "asking if any of the rows of patient 1 on column 3 = true"?
Do you mean a function that accepts the patient ID and column number of event as input, and returns the date as the output?
Ofer Sadan
2021년 1월 7일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!