How to resolve this issue in Cluster "Error using cluster Too many input arguments. Error in try_Clust (line 7) T = cluster(Z,'MaxClust',3);
2 次查看(过去 30 天)
显示 更早的评论
I am getting error on my Mac Book OSx version
I just ran the live script ClusterDataUsingDistanceCriterionExample.mlx
I am pasting the code in short below (Its part of live script):
clear; clc;
load fisheriris
Z = linkage(meas,'average','chebychev');
T = cluster(Z,'MaxClust',3);
cutoff = median([Z(end-2,3) Z(end-1,3)]);
dendrogram(Z,'ColorThreshold',cutoff)
The error is as posted below:
Error using cluster
Too many input arguments.
Error in try_Clust (line 7)
T = cluster(Z,'MaxClust',3);
Details of the Matlab version being installed is here. For better assimilation I tried the same code on matlab.mathworks.com the online version. Error is the same.
Thanks in advance.
ver
-----------------------------------------------------------------------------------------------------
MATLAB Version: 9.9.0.1524771 (R2020b) Update 2
MATLAB License Number: 40841973
Operating System: macOS Version: 11.5 Build: 20G71
Java Version: Java 1.8.0_202-b08 with Oracle Corporation Java HotSpot(TM) 64-Bit Server VM mixed mode
which cluster -all
/Users/makamkirankumar/Desktop/EMG_Analysis/emglab1.03/m files/cluster.m
/Applications/MATLAB_R2020b.app/toolbox/bioinfo/bioinfo/@phytree/cluster.m % phytree method
/Applications/MATLAB_R2020b.app/toolbox/stats/stats/@gmdistribution/cluster.m % gmdistribution method
/Applications/MATLAB_R2020b.app/toolbox/stats/stats/cluster.m % Shadowed
0 个评论
采纳的回答
Ananya Tewari
2021-8-13
Hi,
I tried executing the said example at my end in MATLAB R2020b and it executed successfully without giving any errors. I suspect there is another function named "cluster" which is shadowing the MATLAB function "cluster". This is evident in the output of your "which cluster -all" command.
The cluster function which is being executed is :
/Users/makamkirankumar/Desktop/EMG_Analysis/emglab1.03/m files/cluster.m
Rather than the MATLAB defined function:
/Applications/MATLAB_R2020b.app/toolbox/stats/stats/cluster.m % Shadowed
It is recommended not to use the same function names as MATLAB defined functions. You can try renaming the user-defined "cluster" function to resolve the issue.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Big Data Processing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!