- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我需要绘制这个函数
theta = (-pi:0.01:pi);
f = 3*10^9;
c = 299792458;
da = 2;
这是我的代码,但我不确定它是否正确。我不知道点标记应该在哪里。如何设置X轴递减?
beta = (2*pi*f)/c;
const= (da*beta)/2;
j= (cos(theta)+1).*(besselj(1,const*sin(theta))./(const*sin(theta)));
我的另一个问题是如何在极坐标中绘制此函数。
我做了这样的东西。
polar(theta,j);
是否可以旋转该函数(通过 y 轴)以获得 3D 绘图?
最佳答案
虽然我不会使用符号 j
,但事情对我来说是正确的作为变量,因为(如 i
所做的那样)它是虚数单位 ( sqrt(-1)
) 的符号。这样做会覆盖它,因此事情会一直有效,直到您不需要复数。
当您打算逐个元素地组合数组条目时,您应该使用诸如 ( .*
) 之类的逐元素操作,就像您为获得 F(\theta)
所做的那样。 .事实上,cos(theta)
是 theta
中包含的角度的余弦数组等等。
最后,您可以使用命令 Rotate 3D
旋转绘图在绘图窗口中。尽管如此,您有一个 2D 曲线 ( F(\theta)
),因此,您将继续旋转 2D 图形以获得它的某种透视图,仅此而已。要获得真实信息,您需要一个额外的因变量(或者我误解了您的问题?)。
编辑:现在我明白你的意思了,你想要 Surface of revolution围绕某个轴,我认为由于其中的对称性是 theta=0
.好吧,旋转曲面可以通过一些解析几何获得并绘制,例如通过使用 mesh
.检查一下:
% // 2D polar coordinate radius (your j)
Rad= (cos(theta)+1).*(besselj(1,const*sin(theta))./(const*sin(theta)));
Rad = abs(Rad); % // We need its absolute value for sake of clarity
xv = Rad .* cos(theta); % // 2D Cartesian coordinates
yv = Rad .* sin(theta); % // 2D Cartesian coordinates
phi = -pi:.01:pi; % // 3D revolution angle around theta = 0
% // 3D points of the surface
xf = repmat(xv',size(phi));
yf = yv' * cos(phi);
zf = yv' * sin(phi);
mesh(xf,yf,zf)
还可以添加图形效果
这是通过
完成的mesh(xf,yf,zf,'FaceColor','interp','FaceLighting','phong')
camlight right
和更精细的角度离散化 (1e-3)
.
关于matlab - 在matlab中绘制天线辐射特性,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14172204/
首先,我想了解是否可以插入外部微型 USB WiFi 天线,如 this到 android 手机并通过应用程序驱动它与另一个插入相同天线的 android 设备通信。 我能够使用指定的 android
我要在我的项目中添加一个天线图标。不幸的是,我没有找到任何好的图标。我已经搜索了一个小时,但还没有找到足够好的结果。flutter 就一个这样的图标 Icons.settings_input_ante
前些日子,笔者发现自己的大学在公众号上宣布研究生校区将进行一波网速提升,顿时有些感慨,不得不说这些年国家在“提速降费”上是下了狠手,从工信部发布的今年上半年通信业经济运行情况来看,截至6月末,三
我是一名优秀的程序员,十分优秀!