% arithmetic 算数
% exponents & logarithms 指数与对数
% trigonometry 三角函数
% conplex number 复数
format short
clear cos
cos((((1+2+3+4)^3)/5)^0.5)
cos(sqrt(((1+2+3+4)^3)/5))
sin(sqrt(pi)) + log10(tan(1))
2^(3.5*1.7)
exp(sin(10)) % e^(sin(10))
A = 10
who % 列出 变量
whos % 列出 变量 与 数据类型
a = 1/0 % 无穷大 Inf
b = log(0) % 负无穷 -Inf
c = inf/inf % NaN
eps % 很小的数 2.2204e-16
i % 复数 conplex number
j % 复数 conplex number
pi % π
iskeyword % to list keywords
cos = 'this string.'
cos(8)
clear cos
cos(8)
pi
format long % numeric display format: default format short, 4 digits after the decimal point.
pi
format longE % 科学计数法
pi
format bank % 银行格式,小数点后2位数字:四舍五入到角分那一位
pi
format rat % ratio转换成比例的形式:有理数
pi
f = 3/13 + 4/14 + 5/15;
format rat
f
f = 3/13 + 4/14 + 5/15;
format long
f
% 每行后加分号,阻止输出
% 行后不加分号,代表输出
Matlab 1 (Arithmetic算数、Exponents & Logarithms指数与对数、Trigonometry三角函数、Conplex Number复数)
最后编辑于 :
©著作权归作者所有,转载或内容合作请联系作者
- 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
- 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
- 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
推荐阅读更多精彩内容
- 1、 三角函数double sin (double); 正弦double cos (double);余弦doubl...
- 序 转眼就到了2016年的最后一天,还记得12月月初的时候组长说,元旦有安排了吗?没安排的话值班吧。我当时就愣住了...
- 《王牌特工》开创了新形式的特务电影,轻松的气氛对比高强度的动作戏,嘲弄过往特务电影的老梗,将新世代的幽默完美地融入...