08 2021 档案

摘要:%% %plot plot(cos(0:pi/20:2*pi)) plot(0:pi/20:2*pi,cos(0:pi/20:2*pi)) %从上面可以发现matlab后一次画的图会覆盖前一次画的图 %% %hold on %我们可以使用hold on命令来保留上一次画的图不被擦掉 hold on 阅读全文 »
posted @ 2021-08-28 21:05 Mudrobot 阅读(44) 评论(0) 推荐(0) 编辑
摘要:本章节主要介绍了matlab的结构体和cellarrey等重要的类型,然后讲解了一下xlsx与一些基本文件的读写。 详细细节见下面代码: %% %structure student(1).name='John Doe'; student(1).id='jd2@sfu.ca'; student(1). 阅读全文 »
posted @ 2021-08-28 15:19 Mudrobot 阅读(40) 评论(0) 推荐(0) 编辑
摘要:基础结构化程式 %% % ifelse a=3 if mod(a,2)==0 disp('even') elseif mod(a,2)==3 disp('impossible') else disp('odd') end %% %switch input=-1 switch input case - 阅读全文 »
posted @ 2021-08-28 09:10 Mudrobot 阅读(51) 评论(0) 推荐(0) 编辑
摘要:Xpath是在xml文档中搜索内容的一种语言,而html也相当于一种xml,所以我们可以用Xpath的方式在html中寻找我们需要的数据,下面代码就是一个例子,非常的简单,大家阅读一下应该就能明白: # Xpath是在xml文档中搜索内容的一种语言 # html是xml的一个子集 html=""" 阅读全文 »
posted @ 2021-08-04 14:49 Mudrobot 阅读(69) 评论(0) 推荐(0) 编辑
摘要:本博客主要用来记录一下学习过程中所使用的代码: 我们以豆瓣电影网为例子,来爬取上面的数据: 链接:豆瓣电影 import requests url="https://movie.douban.com/" resp=requests.get(url) resp.encoding="utf-8" #pr 阅读全文 »
posted @ 2021-08-04 13:17 Mudrobot 阅读(97) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示