MATLAB的常用函数都有哪些呢?

如题所述

例如:

f(x)=

x^2,x<1

x,1<=x<2

-x+4,x>=2

可以参考下面的代码:

x=linspace(0,4,10001);

f=x.^2.*(x<1)+x.*(x>=1&x<2)+(-x+4).*(x>=2);

plot(x,f,'r-.')

   

扩展资料:

常用函数表:

sin( )   正弦(变量为弧度)

Cot( )   余切(变量为弧度)

sind( )  正弦(变量为度数)

Cotd( )  余切(变量为度数)

asin( )  反正弦(返回弧度)

acot( )  反余切(返回弧度)

abs( )   取绝对值

atan( )  反正切(返回弧度)

angle( ) 返回复数的相位角

atand( ) 反正切(返回度数)

参考资料来源:百度百科-MATLAB

温馨提示:答案为网友推荐,仅供参考
相似回答
大家正在搜