필터 지우기
필터 지우기

How to calculate residence time?

조회 수: 4 (최근 30일)
Akash Pandya
Akash Pandya 2019년 3월 19일
답변: Image Analyst 2019년 3월 19일
Hi,
I have a time column in picoseconds and 442 distance columns measured in nanometres. I know how to extract the time points that meet the distance threshold I have set.
x = xlsread('10_1.xlsx')
x = x(x(:,2)<=0.5,:);
I want to calculate the total residence time for each of the columns. How can I do this?
Akash
  댓글 수: 2
dpb
dpb 2019년 3월 19일
Dunno...what's the working definition of "residence time" here?
Akash Pandya
Akash Pandya 2019년 3월 19일
So the residence time refers to the time a small molecule is <=0.5 nanometers away from a protein. I want to find the total time where the distance (nm) meets this criteria.
Akash

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

답변 (1개)

Image Analyst
Image Analyst 2019년 3월 19일
Use regionprops() and ask for PixelIdxList. Then use PixelIdxList(end) - PixelIdxList(1) for each region found. Something like
props = regionprops(vec, 'PixelIdxList'); % Vec is a 1-d list of binary (boolean/logical) data of whether x is above 0.5 or not.
% Now find the delta time for all regions found in this vector, vec.
for k = 1 : length(props)
startingIndex = props(k).PixelIdxList(1);
endingIndex = props(k).PixelIdxList(end);
deltaTime(k) = x(endingIndex) - x(startingIndex); % x is the time vector
end
Attach '10_1.xlsx' if you need more help.

카테고리

Help CenterFile Exchange에서 Elementary Polygons에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by