当前位置:网站首页>MATLAB中deg2rad和rad2deg函数的使用
MATLAB中deg2rad和rad2deg函数的使用
2022-07-06 11:21:00 【jk_101】
目录
deg2rad函数的功能是将角从以度为单位转换为以弧度为单位。
rad2deg函数的功能是将角的单位从弧度转换为度。
语法
R = deg2rad(D)
D = rad2deg(R)
说明
对于 D 的每个元素,R = deg2rad(D) 将角的单位从度转换为弧度。
D = rad2deg(R) 将 R 中每个元素的角单位从弧度转换为度。
示例
以弧度为单位的直角
将 90 度角转换为以弧度为单位。
R = deg2rad(90)
R = 1.5708
曲面距离
以度为单位指定慕尼黑和班加罗尔之间的球面距离和地球的平均半径(以千米为单位)。计算慕尼黑和班加罗尔之间的距离(沿地球曲面度量,以千米为单位)。
D = 64.7;
radEarth = 6371;
R = deg2rad(D);
dist = radEarth*R
dist = 7.1943e+03
pi 以度为单位
将 pi 转换为以度为单位。
D = rad2deg(pi)
D = 180
球面距离
指定地球的平均半径和沿着地球表面测量的从慕尼黑到班加罗尔的距离(以千米为单位)。以度为单位计算慕尼黑和班加罗尔之间的球面距离。
dist = 7194;
radEarth = 6371;
R = dist/radEarth;
D = rad2deg(R)
D = 64.6972
输入参数说明
D - 以度为单位的角
以度为单位的角,指定为标量、向量、矩阵或多维数组。如果 D 包含复数元素,则 deg2rad 将分别转换实部和虚部。
数据类型: single | double
复数支持: 是
R - 以弧度为单位的角
以弧度为单位的角,指定为标量、向量、矩阵或多维数组。如果 R 包含复数元素,则 rad2deg 将分别转换实部和虚部。
数据类型: single | double
复数支持: 是
输出参数说明
R - 以弧度为单位的角
以弧度为单位的角,以标量、向量、矩阵或多维数组形式返回。R 的大小与 D 相同。
D - 以度为单位的角
以度为单位的角,以标量、向量、矩阵或多维数组形式返回。D 的大小与 R 的大小相同。
边栏推荐
- 星诺奇科技IPO被终止:曾拟募资3.5亿元 年营收3.67亿
- 三面蚂蚁金服成功拿到offer,Android开发社招面试经验
- R语言ggplot2可视化:使用ggpubr包的ggdotplot函数可视化点阵图(dot plot)、设置palette参数设置不同水平点阵图数据点和箱图的颜色
- C language daily practice - day 22: Zero foundation learning dynamic planning
- [matlab] Simulink the input and output variables of the same module cannot have the same name
- openmv4 学习笔记1----一键下载、图像处理背景知识、LAB亮度-对比度
- 根据PPG估算血压利用频谱谱-时间深度神经网络【翻】
- 快速幂模板求逆元,逆元的作用以及例题【第20届上海大学程序设计联赛夏季赛】排列计数
- 【论文笔记】TransUNet: Transformers Make StrongEncoders for Medical Image Segmentation
- 数学知识——高斯消元(初等行变换解方程组)代码实现
猜你喜欢
助力安全人才专业素养提升 | 个人能力认证考核第一阶段圆满结束!
Simple understanding of MySQL database
From 2022 to 2024, the list of cifar azrieli global scholars was announced, and 18 young scholars joined 6 research projects
史上超级详细,想找工作的你还不看这份资料就晚了
Countdown 2 days | live broadcast preview of Tencent cloud message queue data import platform
Solve DoS attack production cases
基于蝴蝶种类识别
The list of people who passed the fifth phase of personal ability certification assessment was published
Pychrm Community Edition calls matplotlib pyplot. Solution of imshow() function image not popping up
About static type, dynamic type, ID, instancetype
随机推荐
Certains marchés de l'emploi de Shanghai refusent d'embaucher des personnes qui se rétablissent positives à Xinguan
Interview assault 63: how to remove duplication in MySQL?
Synchronous development of business and application: strategic suggestions for application modernization
R语言dplyr包进行数据分组聚合统计变换(Aggregating transforms)、计算dataframe数据的分组均值(mean)
ACTF 2022圆满落幕,0ops战队二连冠!!
R语言ggplot2可视化:使用ggpubr包的ggdotplot函数可视化点阵图(dot plot)、设置palette参数设置不同水平点阵图数据点和箱图的颜色
Use map function and split function to type multiple elements in one line
R语言使用dt函数生成t分布密度函数数据、使用plot函数可视化t分布密度函数数据(t Distribution)
How word displays modification traces
涂鸦智能在香港双重主板上市:市值112亿港元 年营收3亿美元
About NPM install error 1
QPushButton绑定快捷键的注意事项
RT-Thread 组件 FinSH 使用时遇到的问题
美庐生物IPO被终止:年营收3.85亿 陈林为实控人
裕太微冲刺科创板:拟募资13亿 华为与小米基金是股东
受益匪浅,安卓面试问题
ModuleNotFoundError: No module named ‘PIL‘解决方法
Don't miss this underestimated movie because of controversy!
业务与应用同步发展:应用现代化的策略建议
R language ggplot2 visualization: use the ggstripchart function of ggpubr package to visualize the grouped dot strip plot, and set the add parameter to add box plots for different levels of dot strip