matlab漂亮图表,漂亮,美观的图表之Matlab强势回归~~~~走你8

今天来画3D plot

% Load the data

load latticeExample

xx = x(:);yy = y(:);zz = z(:);

% locate the non-zero points

a = find(T~=0);

% plot the non-zero points using a scatter plot

% use the values of T to represent both color and size of symbols

scatter3(xx(a),yy(a),zz(a),1000*T(a),T(a),'filled');

% set the view

view(3);

0818b9ca8b590ca3270a3433284dd417.png

接下来STREAM SLICE;

%% Generate the data

% define the grid

x_lim=.8; y_lim=.8; z_lim=.8; step=.01;

x=[-x_lim:step:x_lim]; y=[-y_lim:step:y_lim]; z=[-z_lim:step:z_lim];

[x y z]=meshgrid(x,y,z);r=sqrt(x.^2+y.^2+z.^2);

%generate the data

cos_theta=z./r; sin_theta=sqrt(1-(cos_theta).^2); % These are the angles made by the x,y,z axes

cos_phi=x./sqrt(x.^2+y.^2); sin_phi=y./sqrt(x.^2+y.^2);

V_dip_ang=cos_theta; %only the angular dependence of the radiation pattern is considered

theta_hat_x=cos_theta.*cos_phi; theta_hat_y=cos_theta.*sin_phi; theta_hat_z=-sin_theta; % theta_hat direction resolved in x,y, and z directions

r_hat_x=sin_theta.*cos_phi; r_hat_y=sin_theta.*sin_phi; r_hat_z=cos_theta; %r_hat direction resolved in x,y, and z directions

E_ang_x=2*cos_theta.*r_hat_x + sin_theta.*theta_hat_x; %x component of the electric field (only the angular pattern)

E_ang_y=2*cos_theta.*r_hat_y + sin_theta.*theta_hat_y; %y component of the electric field

E_ang_z=2*cos_theta.*r_hat_z + sin_theta.*theta_hat_z; %z component of the electric field

E_ang=sqrt(E_ang_x.^2+E_ang_y.^2+E_ang_z.^2); % The magnitude of the electric field

%% Plotting the absolute value of the potential and the magnitude of the electric field distribution on a spehere

% plot the data

streamslice(x,y,z,E_ang_x,E_ang_y,E_ang_z,[-.3 .1],[],[]); % This is used for vector data

% set the view

campos([-3,-15,5])

box on

% set the background and tick colors

set(gca,'Color',[.8,.8,.8],'XColor','black', ...

'YColor','black','ZColor','black')

%annotate

title({'Visualizing the electric field pattern of a ',...

'dipole antenna using \color{red}streamslice'},'Fontsize',14)

0818b9ca8b590ca3270a3433284dd417.png

今天时间有点紧,,就先这些吧。。

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/442244.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

php打开文件读写函数,php中常用文件操作读写函数介绍

本文章介绍了下面几个常用的文件操作函数 file_get_contents 读取整个文件内容 fopen 创建和打开文件 fclose 关闭文件 fgets 读取文件一行内容 file_exists 检查文件或目录是否存在 file_put_contents 写入文件 fwrite 写入文件用 PHP 内置函数 file_exists 可以检查某个文件或…

centos7卸载mysql数据库,CentOS7 安装卸载MySQL

[rootlocalhost ~]# wget -i -c http://dev.mysql.com/get/mysql57-community-release-el7-10.noarch.rpm安装MySQL服务器rootlocalhost ~]# yum -y install mysql-community-server2. MySQL数据库设置启动MySQL[rootlocalhost ~]# systemctl start mysqld.service查看MySQL运行…

php v9 如何获取超级管理员权限,phpcms v9 增加后台管理员其他权限角色可以查看信息不能修改信息...

phpcms v9 增加后台管理员其他角色可以查看信息不能修改信息phpcms\modules\content\templates\content_list.tpl.php这里面判断是不是管理员角色,如果不是原来的编辑链接改为查看链接,php代码如下if ($_SESSION[roleid]!1){?>查看详情}else{?>查…

用matlab绘制外部导入数据图像,matlab 外部数据导入方法详解(3)

● load filename X Y Z ...:将filename中的变量X、Y、Z等导入到工作区中,如果是MAT文件,在指定变量时可以使用通配符“*”。● load filename -regexp expr1 expr2 ...:通过正则表达式指定需要导入的变量。● load -ascii filena…

matlab储备池算法,储备池计算概述.pdf

第 期 电 子 学 报10 Vol.39 No.10年 月2011 10 &a…

matlab课程设计图像处理,MATLAB课程设计--GUI图像处理

% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) [sfilename ,sfilepath]uiputfile({*.jpg;*.bmp;*.tif;*.*},保存图像文件,untitled.jpg);if ~isequal([sfilename,sfilepath],[0,0]) sfil…

php ../ 和 ./ 区别,php $_POST 与 php://input的区别分析

$_POST 与php://input可以取到值,$HTTP_RAW_POST_DATA 为空$_POST 以关联数组方式组织提交的数据,并对此进行编码处理,如urldecode,甚至编码转换php://input 也可以实现此这个功能可以获得POST的原始数据。代码实例echo file_ge…

php fast cgi nginx,通过fast-cgi连接php-fpm和nginx之间的连接是持久的(保持活动)连接吗?...

一年后,我问了这个问题,我似乎找到了答案。(gdb) bt#0 close () at ../sysdeps/unix/syscall-template.S:84#1 0x0000000000a40dff in fcgi_close (req0x1dae3c0, force0, destroy1) at /home/dinosaur/Downloads/php-7.2.2/main/fastcgi.c:1311#2 0x000…

php电影推荐算法,每周一道算法题013:电影推荐

问题:A、B、C三位用户都喜欢看电影,他们给自己所喜欢的电影类型打了如下的分:ABC喜剧片342动作片435生活片451恐怖片113爱情片451B用户喜欢的电影类型是应该推荐给A还是C?思路:用K最近邻(k-nearest neighbours&#xf…

100转换成二进制 java,一段简单的java代码,十进制转二进制

一段简单的java代码,十进制转二进制mip版 关注:188 答案:5 悬赏:40解决时间 2021-01-23 23:14已解决2021-01-23 05:43代码如下,希望可以帮我说明白点这段代码。factorOfTwo到底是指的什么?这段代码是如何运行的?多谢int number…

有向图算法 PHP,科学网—一种可用于脑神经网络分析的有向图分解算法 第六稿 - 谢勤的博文...

摘要:文献[1-9]提出了血液循环在大脑处理信息的过程中具有时序控制作用,并用量化模型结合结构风险最小化相关理论说明时序控制作用的意义。文献[10-24]汇总介绍量化模型中的一些细节。本文介绍我们开发的一个算法,这一算法实现将一个有向网络…

oracle中substrb用法,oracle中substr和instr的用法

1、substr(string string, int a, int b)参数1:string 要处理的字符串参数2:a 截取字符串的开始位置(起始位置是1,也可以是0)参数3:b 截取的字符串的长度(是字符串的结束位置)例如:substr("ABCDEFG", 0); //返回:ABCDEF…

oracle 索引回表,oracle 索引简单总结

建立索引时先进行排序,逻辑上分为Root(根块),Branch(茎块),leaf(叶子块)。leaf中存在索引列的值、长度、和所在rowid,茎块存了指向具体茎块的指针,root块同理。这是逻辑上的划分实际上根据表中数据量的多少可能会存在多…

oracle查效能,【DataGuard】Oracle 11g物理Active Data Guard实时查询(Real-time query)特性...

在Oracle 11g以前版本中的的Data Guard物理备用数据库,可以以只读的方式打开数据库,但此时Media Recovery利用日志进行数据同步的过程就停止了,如果物理备用数据库处于恢复的过程中数据库就不能打开查询,也就是说日志应用和只读打…

oracle sequence last_number,关于oracle序列的LAST_NUMBER

这是正常的,是的.从documentation for the all_sequences data dictionary view开始,last_number是:Last sequence number written to disk. If a sequence uses caching, the number written to disk is the last number placed in the sequence cache. This numbe…

oracle存储过程日志打印,如何在oracle存储过程中逐行打印

我正在执行一个存储过程,但它在某个时候失败了, 当前错误代码不帮我找到错误的位置和确切位置 我想知道它正在失败,所以想要在执行时逐行输出。 例如:如何在oracle存储过程中逐行打印create or replace-- decaring required varia…

linux依赖包在哪个目录,命令-Linux cmd在jar中搜索类文件,而与jar路径无关

Linux,演练以在许多jar中查找类文件。转到包含下面的jar的目录。ericdev /home/el/kafka_2.10-0.8.1.1/libs $ lsblah.txt metrics-core-2.2.0.jarjopt-simple-3.2.jar scala-library-2.10.1.jarkafka_2.10-0.8.1.1-sources.jar zkclient-0.3.jarkafka_2.10-0.8.1.1…

linux 挂在iso文件,linux 挂载iso文件安装文件 与 网络yum的搭建

挂载1.首先,创建文件作为挂载点mkdir /文件名/2.mount /iso/rhel-server-7.3-x86_64-dvd.iso /dir/将/iso目录下的镜像挂载到 /dir/文件上3. cd /etc/yum.repos.d/ 进入文件4. rm -fr * 删除目录下所有文件5.vim yum.repo 编辑文件内容6. rhe17.3] 说明namerhe17.3 …

微软引入linux内核,微软内部已在讨论Linux内核中加入exFAT的可能性

微软的exFAT文件系统已经有十多年的历史了,虽然已经有了一些突破,但是主流Linux内核仍然不支持此文件系统,即使它出现在更多的SD卡和其他设备上。但现在又重新努力将exFAT驱动程序引入Linux内核,有一个开发人员对为exFAT添加一个新…

linux内核ddr初始化,X-007-UBOOT-DDR的初始化(Bubblegum-96平台)

X-007-UBOOT-DDR的初始化(Bubblegum-96平台)作者:wowo 发布于:2016-7-21 22:47分类:X Project1. 前言到目前为止,“X Project”在Bubblegum-96平台上的代码,都是运行在SRAM中。由于SRAM的size很小(最多也就96KB)&#…