MATLAB: How we can make a HeatMap like this heatmapMATLAB Hello all How we can make a HeatMap like this from the data that I attached? https://drive.google.com/file/d/1T740vL70KJV10kVlxN13u5e0Z19qJhV0/view?usp=sharing Best Answer Hi,Maybe not the best way but it works:velocityrange=-80:5:80;momentrange=-250:10:250;for i=1:numel(momentrange) for j=1:numel(velocityrange) b=find(abs(moment-momentrange(i))<2.5); c=find(abs(velocity-velocityrange(j))<5); count=0; for k=1:numel(b) if find(b(k)==c) count=count+1; end end heatmap(i,j)=count; endendimagesc(heatmap) Related SolutionsMATLAB: How to remove this error Look at the help for RMS:rmsRoot-mean-square levelexpand all in pageSyntaxY = rms(X)Y = rms(X,DIM)Do you see anywhere there where it allows for 3 input arguments like you're trying? MATLAB: How to plot a heatmap of a table where the rows represent y position and columns the x position using the data as the heat variable. Version 2017a introduced the function heatmap. See the documentation:https://uk.mathworks.com/help/matlab/ref/heatmap.html Related QuestionHow to delete rows from a cell array that do not satisfy a certain conditionHow to assign the value to the min/max of a color map in heatmapHow to create a heat map without the dendrogramHow to find 3 unknows with Least square a*cosh(b*x)+c, not using toolbox
Best Answer