
Word Cloud (词云) - Matlab
##### >> Sample Code
##### >> Related Blogs
1. [Word Cloud (������) - Python](https://www.cnblogs.com/yukiwu/p/10967037.html)2. [Word Cloud (������) - JavaScript](https://www.cnblogs.com/yukiwu/p/10968816.html)3. [Word Cloud (������) - R](https://www.cnblogs.com/yukiwu/p/10969250.html)
发布日期:2021-05-09 09:08:20
浏览次数:17
分类:博客文章
本文共 1903 字,大约阅读时间需要 6 分钟。
��������������������� Word Cloud ��������������������������� Matlab ��������� word cloud���Matlab R2018b ������������ [wordcloud](https://www.mathworks.com/help/matlab/ref/wordcloud.html) ������������������������������������ ##### >> Create Word Cloud via Matlab- ���������������
������������������������������������������ Word Cloud History.txt ���������������
- ������������������������������
%read txt as a stringtext = string(fileread('C:\Users\yuki\Desktop\WordCloudHistory.txt'));%delete puchuationpunctuationCharacters = ["." "?" "!" "," ";" ":"];text = replace(text,punctuationCharacters," ");%convert a string to arraywords = split(join(text));%delete the words has less than 5 characters, which are problely stop wordswords(strlength(words)<5) = [];%change all words to lowercasewords = lower(words);
- ������������������������������
%calculate the frequencies for every word[numOccurrences,uniqueWords] = histcounts(categorical(words));
- ������ word cloud���
figure%set properties for word cloudwordcloud(uniqueWords,numOccurrences,'Shape', "rectangle", 'MaxDisplayWords', 200);title("Word Cloud History")##### >> Notes
Matlab ������������������������������������������������������������������������
���������������������������������������������������������������������������������������������������������������������
Tool | Easy Use | Free | Need Script | |||
---|---|---|---|---|---|---|
Python | Clear document, powerful text mining library | Yes | Yes | |||
JavaScript | Need to extract array by own, and need to find a way to save the image | Yes | Yes | |||
R | Clear document, powerful text mining library | Yes | Yes | |||
Matlab | Clear document, interactive interface | No | Optional |
##### >> Related Blogs
1. [Word Cloud (������) - Python](https://www.cnblogs.com/yukiwu/p/10967037.html)2. [Word Cloud (������) - JavaScript](https://www.cnblogs.com/yukiwu/p/10968816.html)3. [Word Cloud (������) - R](https://www.cnblogs.com/yukiwu/p/10969250.html)
发表评论
最新留言
初次前来,多多关照!
[***.217.46.12]2025年05月02日 18时41分07秒
关于作者

喝酒易醉,品茶养心,人生如梦,品茶悟道,何以解忧?唯有杜康!
-- 愿君每日到此一游!
推荐文章
制作JS验证码(简易)
2021-05-14
adb通过USB或wifi连接手机
2021-05-14
泛型机制 Generic
2021-05-14
包装类
2021-05-14
JDK9-15新特性
2021-05-14
集合继承结构
2021-05-14
LinkedList 实现类
2021-05-14
Vector 实现类
2021-05-14
HashMap类、HashSet
2021-05-14
HashTable类
2021-05-14
TreeSet、TreeMap
2021-05-14
ObjectInputStream、ObjectOutputStream
2021-05-14
JVM内存模型
2021-05-14
反射机制
2021-05-14
反射Field、Method、Constructor
2021-05-14
可变长度参数
2021-05-14
类加载器子系统
2021-05-14
堆空间常用参数总结
2021-05-14
逃逸分析-堆分配对象
2021-05-14