Filter löschen
Filter löschen

Error using corrplot on a matrix

1 Ansicht (letzte 30 Tage)
Sunny am 10 Dez. 2018
Kommentiert: Cris LaPierre am 11 Dez. 2018
I am trying to apply correlation plot for a 45*45 matrix. But I am getting following error. Please find the matrix files attached in this thread and code below.
% Error
% Not enough input arguments.
% Error in nanmean (line 7)
% N = sum(~isnan(x), dim);
% Error in corrplot (line 243)
% Mu = nanmean(X);

Akzeptierte Antwort

Cris LaPierre
Cris LaPierre am 11 Dez. 2018
Bearbeitet: Cris LaPierre am 11 Dez. 2018
What version of MATLAB are you using? I see you are using 2018a while I'm using 2018b. I get a different error message.
Error using
Value must be a 1x2 vector of numeric type in which the second element is larger than the first and may be Inf
Error in corrplot (line 280)
I think the one I'm getting is related to the use of the subplot command. Corrplot will automatically plot to the current axes, but it will itself create a matrix of plots. Therefore, trying to limit it to one axes in a subplot causes an error.
When I remove the subplot commands, I find the corrplot of a 45x45 matrix to be extremely taxing on the system - but it doesn't error out. When something does appear, the text labels and histograms created by corrplot obscure me from actually seeing anything, and I've not been patient enough to ever actually let my computer finish processing. You may need to reconsider your approach to actually get something you can use.
  6 Kommentare
Sunny am 11 Dez. 2018
Great, this works. Not aware of this. Thanks
Cris LaPierre
Cris LaPierre am 11 Dez. 2018
There are several built-in colormaps you can set. You also have the ability to create your own if you want.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)


Mehr zu Colormaps finden Sie in Help Center und File Exchange




Community Treasure Hunt

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

Start Hunting!

Translated by