matlab - 在 Matlab 中绘制 FCM 簇
问题描述
我可以将 2 个集群可视化为此链接中的示例:
在这种情况下,如何可视化 3 或 4 个集群?每个集群都有一个中心,这些集群有不同的颜色。
我已经尝试过了,但不能将 3 个集群放在 3 种不同的颜色中:
figure
plot(fcmdata(:,1),fcmdata(:,2),'o')
line(fcmdata(index1,1), fcmdata(index1,2), 'linestyle',...
'none','marker', 'o','color','g')
plot(fcmdata(:,1),fcmdata(:,2),'o')
hold on
line(fcmdata(index2,1),fcmdata(index2,2),'linestyle',...
'none','marker', 'o','color','r')
plot(fcmdata(:,1),fcmdata(:,2),'o')
hold on
line(fcmdata(index3,1),fcmdata(index3,2),'linestyle',...
'none','marker', 'o','color','b')
%line(fcmdata(index4,1),fcmdata(index4,2),'linestyle',...
% 'none','marker', 'o','color','c')
hold on
plot(center(1,1),center(1,2),'kx','markersize',15,'LineWidth',2)
plot(center(2,1),center(2,2),'kx','markersize',15,'LineWidth',2)
plot(center(3,1),center(3,2),'kx','markersize',15,'LineWidth',2)
我想念什么吗?我在哪里可以更改代码以 3 种不同颜色绘制 3 个集群?
解决方案
推荐阅读
- multithreading - 使用Arduino从串口读取提供垃圾输出
- html - 显示一个(n)
- 基于@media 查询格式化为弹性盒
- python - 无法使用烧瓶邮件发送电子邮件
- winston - winstonjs - 通过管道使用winston记录子进程stdout / stderr
- winforms - Windows 窗体应用程序 - 如何使选项卡控件中的选项卡获得全宽?
- r - 自动生成pdf和txt文件的名称
- javascript - Chrome 扩展打开了更多的标签
- java - 比较两个数组,然后用公共元素制作另一个数组(并且没有重复)
- ios - JSON key:value pairs disappearing after original json call
- html - 我如何获取 url 参数链接/#parameter