% Example of Usage
% [**] 0,1 is the range of Y-axis (Range of FRET efficiency values in
% Y-axis). If you want to plot with Y-axis range of 0,1 then use 0,1. If
% you want to plot the Y-axis with the range of 0.5-0.8 (to show narrower
% FRET range), then use 0.5,0.8.
% [**] 50 is the number of frames that you want to show in the X-axis. If you
% want to show first 50 data points in your .dat files (described below).Then use 50.
% [**] 1*10^-2. Each point in the 2D heat map is gaussian blurred across the Y-axis only. 1*10^-3 is the
% FRET variance of this gaussian blur (variance across Y axis)
% [**] 6.5 is the width of the heat map. You can input any value.
% [**] 4 is the height of the heat map. You can input any value.
% [**] hot is type of heat map. MATLAB has a bunch of styles. User can choose from any of the following
% *.dat trajectory files are required which have time-point or frame number in one column.
% The donor and acceptor values in another column.
% Please ensure that the only .dat files present in the folder are your trajectories.
% Any other .dat file present in the folder and the program won't work.
% This program generates a heat map in MATLAB. It also generates a file
% called Simple_FRETDistribution_with_Time.datx. This is another text file.
% You can copy paste the values in this .datx file into OriginPro or other
% plotting software to make the heat map. IMO, the heatmap from Matlab
% should suffice. You can also change the dimensions of the heatmap in
% MATLAB as has been noted above.
% The range of 2D population is normalized between 0-1. 1 indicates the
% highest population in a particular pixel. 0 indicates the lowest
% This code is not efficiently written. The lines 82-89 can be much better
% handled by vectorization. I got lazy there, please vectorize it the speed
% is too slow ,but the speed should be fine even for large datasets.
Digvijay Singh (2021). Plot 2D heat map of FRET efficiency values (https://www.mathworks.com/matlabcentral/fileexchange/85388-plot-2d-heat-map-of-fret-efficiency-values), MATLAB Central File Exchange. Retrieved .
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!