当前位置:网站首页>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 的大小相同。
边栏推荐
- Optical blood pressure estimation based on PPG and FFT neural network [translation]
- Openmv4 learning notes 1 --- one click download, background knowledge of image processing, lab brightness contrast
- Tensorflow and torch code verify whether CUDA is successfully installed
- R language ggplot2 visualization: use ggviolin function of ggpubr package to visualize violin diagram
- CCNP Part 11 BGP (III) (essence)
- Mathematics in machine learning -- common probability distribution (XIII): Logistic Distribution
- 全套教学资料,阿里快手拼多多等7家大厂Android面试真题
- AvL树的实现
- A wearable arm device for night and sleeveless blood pressure measurement [translation]
- Use map function and split function to type multiple elements in one line
猜你喜欢
ROS custom message publishing subscription example
Jushan database was among the first batch of financial information innovation solutions!
史上超级详细,想找工作的你还不看这份资料就晚了
全套教学资料,阿里快手拼多多等7家大厂Android面试真题
Graffiti intelligence is listed on the dual main board in Hong Kong: market value of 11.2 billion Hong Kong, with an annual revenue of 300 million US dollars
pytorch常见损失函数
【论文笔记】TransUNet: Transformers Make StrongEncoders for Medical Image Segmentation
Solution of commercial supply chain management platform for packaging industry: layout smart supply system and digitally integrate the supply chain of packaging industry
Online notes
How to improve website weight
随机推荐
R语言ggplot2可视化:使用ggpubr包的ggviolin函数可视化小提琴图
From 2022 to 2024, the list of cifar azrieli global scholars was announced, and 18 young scholars joined 6 research projects
CCNP Part 11 BGP (III) (essence)
R language ggplot2 visualization: use the ggdotplot function of ggpubr package to visualize dot plot, set the palette parameter, and set the colors of data points and box graphs of dot plots at differ
Help improve the professional quality of safety talents | the first stage of personal ability certification and assessment has been successfully completed!
Crawling data encounters single point login problem
关于静态类型、动态类型、id、instancetype
AcWing 3537.树查找 完全二叉树
English topic assignment (25)
Word如何显示修改痕迹
Interview assault 63: how to remove duplication in MySQL?
A wearable arm device for night and sleeveless blood pressure measurement [translation]
PMP每日一练 | 考试不迷路-7.6
Based on butterfly species recognition
渲大师携手向日葵,远控赋能云渲染及GPU算力服务
朗坤智慧冲刺科创板:年营收4亿 拟募资7亿
Actf 2022 came to a successful conclusion, and 0ops team won the second consecutive championship!!
[depth first search] Ji suanke: find numbers
Pychrm Community Edition calls matplotlib pyplot. Solution of imshow() function image not popping up
Camel case with Hungarian notation