MATLAB 帮助中心
本页采用了机器翻译。点击此处可查看英文原文。
如果输入与 'degree' 匹配则为真,与 'radian' 匹配则为假
'degree'
'radian'
tf = map.geodesy.isDegree(angleUnit)
如果 angleUnit 与 'degree'(或 'degrees') 部分匹配,则 tf = map.geodesy.isDegree(angleUnit) 返回 true;如果 angleUnit 与 'radian' (或 'radians') 部分匹配,则返回 false。如果 angleUnit 既不匹配 'degrees' 也不匹配 'radians',则 map.geodesy.isDegree 会返回错误。
angleUnit
'degrees'
tf
true
'radians'
false
map.geodesy.isDegree
示例
全部折叠
编写一个函数来计算余弦值。在该函数中,使用 map.geodesy.isDegree 来检查输入的有效性。
function y = cosine(x, angleUnit) % X can be in either degrees or radians if map.geodesy.isDegree(angleUnit) y = cosd(x); else y = cos(x); end
角度单位的值,指定为 'degree' 或 'radian'。
数据类型: char | string
char
string
表示是否找到匹配项的布尔标志,以逻辑标量形式返回。
在 R2013a 中推出
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处