I am collecting cell movement tracks from MTrackJ, an ImageJ plugin. I can pass the coordinates of the tracks to an array, but I am trying to make a flowerplot, wherein all my tracks start at the same point and then trace their paths from there. Below is the code I am using so far:
prompt = 'How many tracks do you want to analyze?';
track_num = input(prompt);
disp('Select the track you wish to analyze.')
figure(); hold on for i=1:track_num
filename = uigetfile('*.mdf','C:\Users\Szasz_T\Documents\Matlab'); %Note: file name cannot contain underscores
Track= read_mdf(filename);
Track(:,3:4) = Track(:,3:4)*0.12; %Multiplies by um/pixel; change to whatever ratio you acquire images at
Track(:,6) = Track(:,6)*10; %Multiplies by number of seconds per frame
norm(Track(end,3:4)-Track(1,3:4))/(Track(end,6)-Track(1,6))%Outputs distance traveled in um/s
for i = 1:size(Track,1)-1 %Calculates length of each step in trajectory
Track_steps(i) = norm(Track(i+1,3:4)-Track(i,3:4));
end
zeroes = [0 0 0 0 0 0];
Track = cat(1,zeroes, Track);
plot(Track(:,3), Track(:,4))
end
hold off
title('Representation of Cell Motility')
I can use my "zeroes" array to force the first coordinate to be a certain point, but I do not know how to simply set all tracks to begin at one origin, if this is possible.
Thanks for any help one can offer.

 채택된 답변

Aubrey Howard
Aubrey Howard 2018년 7월 18일

0 개 추천

I have been struggling with the same issue myself. It's clear you have made much more progress than I have.

댓글 수: 1

Taylor Szasz
Taylor Szasz 2018년 7월 18일
Hi Aubrey,
I ended up actually just doing everything in Excel. I subtracted a set value for the first track from each subsequent track. Hope this helps.

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Logical에 대해 자세히 알아보기

질문:

2015년 9월 28일

댓글:

2018년 7월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by