heatmap function doesn't work (Error in heatmap (line 138))
Show older comments
I'm trying to use the heatmap function. I can't get it to work. I can't even get the example from the mathworks website to work:
cdata = [45 60 32; 43 54 76; 32 94 68; 23 95 58];
h = heatmap(cdata);
which returns:
Not enough input arguments.
(Error in heatmap (line 138)
[h3, Centers] = hist3([x1, x2], nbins) ;
I don't know how I can figure out what's wrong with my code, if the example doesn't even work. Any help would be appreciated.
5 Comments
Let's check that you don't have more than 1 heatmap file. Could you return the results of this line below? It should produce one or more paths to heatmap files.
which heatmap -all
bryan flood
on 7 May 2019
bryan flood
on 7 May 2019
Star Strider
on 7 May 2019
Leave the ones that are subdirectories of: C:\Program Files\MATLAB\R2019a\toolbox\matlab\.
I would just slightly rename the one you downloaded from the File Exchange, so that it doesn’t overshadow the built-in MATLAB functions. Removimg it completely is unnecessary. It may have features you want.
Steven Lord
on 7 May 2019
Leave them both.
The one in the @tall directory is the heatmap method used when you try to create a heatmap plot with a tall array as input.
The one in the specgraph directory is the heatmap function used when you try to create a heatmap plot with normal double precision or table data.
Accepted Answer
More Answers (0)
Categories
Find more on Data Distribution Plots in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!