Matlab 画三维立体图形 The aim of geom3d library is to handle and visualize 3D geometric primitives such as points, lines, planes, polyhedra... It provides low-level functions for manipulating 3D geometric primitives, making easier the development of more complex geometric algorithms. Some features of the library are: - creation of various shapes (3D points, 3D lines, planes, polyhedra...) through an intuitive syntax. Ex: createPlane(p1, p2, p3) to create a plane through 3 points. - derivation of new shapes: intersection between 2 planes, intersection between a plane and a line, between a sphere and a line... - functions for 3D polygons and polyhedra. Polyhedra use classical vertex-faces arrays (face array contain indices of vertices), and support faces with any number of vertices. Some basic models are provided (createOctaedron, createCubeoctaedron...), as well as some computation (like faceNormal or centroid) - manipulation of planar transformation. Ex.: ROT = createRotationOx(THETA); P2 = transformPoint3d(P1, ROT); - direct drawing of shapes with specialized functions. Clipping is performed automatically for infinite shapes such as lines or rays. Ex: drawPoint3d([50 50 25; 20 70 10], 'ro'); % draw some points drawLine3d([X0 Y0 Z0 DX DY DZ]); % clip and draw straight line Some functions require the geom2d package. Additional help is provided in geom3d/Contents.m file, as well as summary files like 'points3d.m' or 'lines3d.m'.
标签: Matlab 画三维立体图形
上传时间: 2015-11-02
上传用户:A1321
有向图的邻接表存储,递归和非递归的深度、广度遍历
标签: 有向图,无向图的深度,广度遍历
上传时间: 2015-12-10
上传用户:qctxh
modelsim-win64-10.1c-se.exe 破解程序
标签: modelsim-win 10.1 c-se exe 64 破解
上传时间: 2016-04-28
上传用户:liangbof
批处理感知器算法的代码matlab w1=[1,0.1,1.1;1,6.8,7.1;1,-3.5,-4.1;1,2.0,2.7;1,4.1,2.8;1,3.1,5.0;1,-0.8,-1.3; 1,0.9,1.2;1,5.0,6.4;1,3.9,4.0]; w2=[1,7.1,4.2;1,-1.4,-4.3;1,4.5,0.0;1,6.3,1.6;1,4.2,1.9;1,1.4,-3.2;1,2.4,-4.0; 1,2.5,-6.1;1,8.4,3.7;1,4.1,-2.2]; w3=[1,-3.0,-2.9;1,0.5,8.7;1,2.9,2.1;1,-0.1,5.2;1,-4.0,2.2;1,-1.3,3.7;1,-3.4,6.2; 1,-4.1,3.4;1,-5.1,1.6;1,1.9,5.1]; figure; plot(w3(:,2),w3(:,3),'ro'); hold on; plot(w2(:,2),w2(:,3),'b+'); W=[w2;-w3];%增广样本规范化 a=[0,0,0]; k=0;%记录步数 n=1; y=zeros(size(W,2),1);%记录错分的样本 while any(y<=0) k=k+1; y=a*transpose(W);%记录错分的样本 a=a+sum(W(find(y<=0),:));%更新a if k >= 250 break end end if k<250 disp(['a为:',num2str(a)]) disp(['k为:',num2str(k)]) else disp(['在250步以内没有收敛,终止']) end %判决面:x2=-a2*x1/a3-a1/a3 xmin=min(min(w1(:,2)),min(w2(:,2))); xmax=max(max(w1(:,2)),max(w2(:,2))); x=xmin-1:xmax+1;%(xmax-xmin): y=-a(2)*x/a(3)-a(1)/a(3); plot(x,y)
上传时间: 2016-11-07
上传用户:a1241314660
#include <stdio.h> #include <stdlib.h> ///链式栈 typedef struct node { int data; struct node *next; }Node,*Linklist; Linklist Createlist() { Linklist p; Linklist h; int data1; scanf("%d",&data1); if(data1 != 0) { h = (Node *)malloc(sizeof(Node)); h->data = data1; h->next = NULL; } else if(data1 == 0) return NULL; scanf("%d",&data1); while(data1 != 0) { p = (Node *)malloc(sizeof(Node)); p -> data = data1; p -> next = h; h = p; scanf("%d",&data1); } return h; } void Outputlist(Node *head) { Linklist p; p = head; while(p != NULL ) { printf("%d ",p->data); p = p->next; } printf("\n"); } void Freelist(Node *head) { Node *p; Node *q = NULL; p = head; while(p != NULL) { q = p; p = p->next; free(q); } } int main() { Node *head; head = Createlist(); Outputlist(head); Freelist(head); return 0; } 2.顺序栈 [cpp] view plain copy #include <iostream> #include <stdio.h> #include <stdlib.h> ///顺序栈 #define MaxSize 100 using namespace std; typedef
上传时间: 2018-05-09
上传用户:123456..
个人博客系统,使用MVC架构。啊打算大苏打倒萨倒萨倒萨的
上传时间: 2018-09-12
上传用户:zzzzz3211
1. 日语假名及其发音一览 平 片 罗 平 片 罗 平 片 罗 平 片 罗 平 片 罗 假 假 马 假 假 马 假 假 马 假 假 马 假 假 马 音 音 音 音 音 ______________________________________________________________________________ あ ア a い イ i う ウ u え エ e お オ o か カ ka き キ ki く ク ku け ケ ke こ コ ko さ サ sa し シ si/shi す ス su せ セ se そ ソ so た タ ta ち チ chi つ ツ tsu て テ te と ト to な ナ na に ニ ni ぬ ヌ nu ね ネ ne の ノ no は ハ ha ひ ヒ hi ふ フ fu へ ヘ he ほ ホ ho ま マ ma み ミ mi む ム mu め メ me も モ mo や ヤ ya ゆ ユ yu よ ヨ yo ら ラ ra り リ ri る ル ru れ レ re ろ ロ ro わ ワ wa を ヲ o/wo ん ン n が ガ ga ぎ ギ gi ぐ グ gu げ ゲ ge ご ゴ go ざ ザ za じ ジ zi/ji ず ズ zu ぜ ゼ ze ぞ ゾ zo だ ダ da ぢ ヂ ji/di づ ヅ zu/du で デ de ど ド do ば バ ba び ビ bi ぶ ブ bu べ ベ be ぼ ボ bo ぱ パ pa ぴ ピ pi ぷ プ pu ぺ ペ pe ぽ ポ po きゃ キャ kya きゅ キュ kyu きょ キョ kyo しゃ シャ sya しゅ シュ syu しょ ショ syo ちゃ チャ cya ちゅ チュ cyu ちょ チョ cyo にゃ ニャ nya にゅ ニュ nyu にょ ニョ nyo ひゃ ヒャ hya ひゅ ヒュ hyu ひょ ヒョ hyo みゃ ミャ mya みゅ ミュ myu みょ ミョ myo りゃ リャ rya りゅ リュ ryu りょ リョ ryo ぎゃ ギャ gya ぎゅ ギュ gyu ぎょ ギョ gyo じゃ ジャ zya/ja じゅ ジュ yu/ju じょ ジョzyo/jo びゃ ビャ bya びゅ ビュ byu びょ ビョ byo ぴゃ ピャ pya ぴゅ ピュ pyu ぴょ ピョ pyo
标签: 日语
上传时间: 2019-07-19
上传用户:sxc1997
以后再也不用担心写爬虫ip被封,不用担心没钱买代理ip的烦恼了 在使用python写爬虫时候,你会遇到所要爬取的网站有反爬取技术比如用同一个IP反复爬取同一个网页,很可能会被封。如何有效的解决这个问题呢?我们可以使用代理ip,来设置代理ip池。 现在教大家一个可获取大量免费有效快速的代理ip方法,我们访问西刺免费代理ip网址 这里面提供了许多代理ip,但是我们尝试过后会发现并不是每一个都是有效的。所以我们现在所要做的就是从里面提供的筛选出有效快速稳定的ip。 以下介绍的免费获取代理ip池的方法: 优点:免费、数量多、有效、速度快 缺点:需要定期筛选 主要思路: 从网址上爬取ip地址并存储 验证ip是否能使用-(随机访问网址判断响应码) 格式化ip地址 代码如下: 1.导入包 import requests from lxml import etree import time 1 2 3 2.获取西刺免费代理ip网址上的代理ip def get_all_proxy(): url = 'http://www.xicidaili.com/nn/1' headers = { 'User-Agent': 'Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36', } response = requests.get(url, headers=headers) html_ele = etree.HTML(response.text) ip_eles = html_ele.xpath('//table[@id="ip_list"]/tr/td[2]/text()') port_ele = html_ele.xpath('//table[@id="ip_list"]/tr/td[3]/text()') proxy_list = [] for i in range(0,len(ip_eles)): proxy_str = 'http://' + ip_eles[i] + ':' + port_ele[i] proxy_list.append(proxy_str) return proxy_list 1 2 3 4 5 6 7 8 9 10 11 12 13 14 3.验证获取的ip def check_all_proxy(proxy_list): valid_proxy_list = [] for proxy in proxy_list: url = 'http://www.baidu.com/' proxy_dict = { 'http': proxy } try: start_time = time.time() response = requests.get(url, proxies=proxy_dict, timeout=5) if response.status_code == 200: end_time = time.time() print('代理可用:' + proxy) print('耗时:' + str(end_time - start_time)) valid_proxy_list.append(proxy) else: print('代理超时') except: print('代理不可用--------------->'+proxy) return valid_proxy_list 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 4.输出获取ip池 if __name__ == '__main__': proxy_list = get_all_proxy() valid_proxy_list = check_all_proxy(proxy_list) print('--'*30) print(valid_proxy_list) 1 2 3 4 5 技术能力有限欢迎提出意见,保证积极向上不断学习 ———————————————— 版权声明:本文为CSDN博主「彬小二」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。 原文链接:https://blog.csdn.net/qq_39884947/article/details/86609930
上传时间: 2019-11-15
上传用户:fygwz1982
使用matlab实现gibbs抽样,MCMC: The Gibbs Sampler 多元高斯分布的边缘概率和条件概率 Marginal and conditional distributions of multivariate normal distribution
上传时间: 2019-12-10
上传用户:real_
超声波测距在智能机器人中的开发与应用摘 要:本文提出了在机器人控制中,使用软件方法实现超声波测距机器人避障功能的工作原理和设计 方法。该系统在使用过程中,测量精度高,机器人避障准确,可靠,真正实现了智能化控制。 关键词:机器人 超声波 测距 软件触发 Abstract: The 0n pnnc eanddesignm d10d ofu]U~ sordc are descx'~edindetail fora intenigencero~ ic . ByI|8i“gthissystem,therobotmakesaccta~elyavoidingdmwhackhi# reliability. 1畸 wo阿s:ro tultro-sor~c聊 曲 喀sot~aretrigger 1 引言 在智能机器人的研制开发中,很重要 的一部 分就是机器人 要能实现避 障功能 ,即通过传感器 的作用 ,探测机器人行进道路 上是否碰到障碍。 若碰到了障碍 ,机器人应该 自动转向 ,躲避障碍 。 本文所介 绍的超声 波测距方法 ,应用 于 ET一18 Hem智能机器人中。通过超声波测距 ,该智能机 器人实现了对步进电动机的智能控制及运动控制 方式的灵活应用。同时,超声波测距作为一种非 接触 的检测方式 ,和红外 、激光及无线电测距相 比,在近距范 围内有不受光线影响、结构简单 、成 本低等优点 2 超声波测距基本原理 超声波是指频率在 2000Hz以上 ,不能引起正 常人听觉反应 的机械振动波 ,是物体 的机械振 动 在弹性介质 中传播所形成 的机械振动波。由于超 声波具有非常短 的波长 ,可 以聚集成狭小 的发
上传时间: 2022-02-16
上传用户:jiabin