MATLAB基本函数
来源:互联网 发布:80端口号被占用 编辑:程序博客网 时间:2024/04/30 04:48
输入复数 sd=5+6i
取得实部 r=real(sd)
取得虚部 im=imag(sd)
取得模 a=abs(sd)
取得复数的相位角以弧度为单位 an=angle(sd)
复数矩阵有两种输入方法
1.A=[2,4;1,6]-[3,7;3,9]*i
得到
A =
2.0000 - 3.0000i 4.0000 - 7.0000i
1.0000 - 3.0000i 6.0000 - 9.0000i
2.B=[2+5i,3+2i;6-9i,3-5i]
得到
B =
2.0000 + 5.0000i 3.0000 + 2.0000i
6.0000 - 9.0000i 3.0000 - 5.0000i
矩阵相减
C=B-A
计算-8的立方根
>> a=-8;
>> r=a^(1/3)
得到
r =
1.0000 + 1.7321i
为了得到-8所有立方根
>> R=abs(a)^(1/3);
>> m=[0,1,2];
>> theta=(angle(a)+2*pi*m)/3;
>> r=R*exp(i*theta)
得到
r =
1.0000 + 1.7321i -2.0000 + 0.0000i 1.0000 - 1.7321i
命令行的特殊输入
按shift+enter暂不执行此行命令进入下一行输入,此时还可编辑本行或上面一行命令,按回车运行全部
输入format short; x=(1:10)'; logs=[x log10(x)]
得到
logs =
1.0000 0
2.0000 0.3010
3.0000 0.4771
4.0000 0.6021
5.0000 0.6990
6.0000 0.7782
7.0000 0.8451
8.0000 0.9031
9.0000 0.9542
10.0000 1.0000
- matlab 基本数学函数
- MATLAB基本矩阵函数
- MATLAB基本函数
- matlab基本函数
- MATLAB中基本函数
- Matlab基本函数
- Matlab基本函数-ceil函数
- Matlab基本函数-colormap函数
- Matlab基本函数-compass函数
- Matlab基本函数-complex函数
- Matlab基本函数-conj函数
- Matlab基本函数-contrast函数
- Matlab基本函数-cylinder函数
- Matlab基本函数-disp函数
- Matlab基本函数-exp函数
- Matlab基本函数-expm函数
- Matlab基本函数-feather函数
- Matlab基本函数-fix函数
- vlc-android 中调用用libvlcjni.so实现流媒体播放
- java中的length属性和length()方法和size()方法
- hdu_1020:Encoding
- 畜生!放开我的C盘 – ANDROID_SDK_HOME 环境变量的配置
- 如何让margin在IE、Firefox、Chrome、Safari下兼容
- MATLAB基本函数
- [Accessibility] Missing contentDescription attribute on image 解决
- LI 标签中让文章标题左对齐,日期右对齐的方法
- Android 安装位置 – installLocation简析
- 关于lucene的demo运行时出现Exception in thread "main" java.lang.NoClassDefFoundError错误
- 黑马程序员-学习日记9(集合框架 2 )
- Eclipse 快捷键
- gerrit 在win7下安装总结
- xml学习笔记