当前位置:网站首页>Matlab在线性代数中的应用(四):相似矩阵及二次型
Matlab在线性代数中的应用(四):相似矩阵及二次型
2022-07-05 06:42:00 【文宇肃然】
有时我们需要精确的特征值和特征向量,就须利用 Matlab 的符号运算功能。
在 Matlab 中创建符号矩阵和创建数值矩阵的形式很相似,只不过要用到符号定义函数sym。
下面介绍使用此函数创建符号矩阵的几种形式。
1、使用 sym 函数直接创建符号矩阵
此方法和直接创建数值矩阵的方法几乎完全相同。
矩阵元素可以是符号表达式,各 符号表达式的长度可以不同,矩阵元素之间可用空格或逗号分隔。
例如:
x=sym('[a+sin(d),b;1/c,d]'); y=det(x)
求得 y=(d*c*a+d*c*sin(d)-b)/c
2、将数值矩阵转化为符号矩阵
在 Matlab 中,数值矩阵不能直接参与符号运算,必须先转化为符号矩阵。
例如:
a=[2/3,sqrt(2);3,1]
a=
0.66671.4142
3.00001.0000
b=sym(a)
b=
[ 2/3, sqrt(2)]
[3,1]
3、符号矩阵的索引和修改
Matlab 的符号矩阵索引和修改同数值矩阵的索引和修改完全相同。
例如:
对上例中的矩阵 b 进行修改
b(2,2)='log(9)'
01
—
求一个正交变换 x = Py ÿ
边栏推荐
- 【软件测试】05 -- 软件测试的原则
- Redis-02. Redis command
- [tf] Unknown: Failed to get convolution algorithm. This is probably because cuDNN failed to initial
- ROS2——topic话题(八)
- H5 模块悬浮拖动效果
- 7. Oracle table structure
- SOC_SD_DATA_FSM
- Rehabilitation type force deduction brush question notes D3
- Vant Weapp SwipeCell设置多个按钮
- 数据库Mysql全部
猜你喜欢

Some classic recursion problems

namespace

Record of problems in ollvm compilation

ROS2——工作空间(五)

7. Oracle table structure

Special training of C language array

Database mysql all

Dameng database all

ROS2——ROS2对比ROS1(二)

'mongoexport 'is not an internal or external command, nor is it a runnable program or batch file.
随机推荐
Vscode editor
【软件测试】05 -- 软件测试的原则
PHY驱动调试之 --- PHY控制器驱动(二)
'mongoexport 'is not an internal or external command, nor is it a runnable program or batch file.
ethtool 原理介绍和解决网卡丢包排查思路(附ethtool源码下载)
PR automatically moves forward after deleting clips
Initialization of global and static variables
Logical structure and physical structure
Orin 安装CUDA环境
ROS2——配置开发环境(五)
mysql设置触发器问题
Use ffmpeg to rotate, flip up and down, and flip horizontally
程序中的负数存储及类型转换
C语言数组专题训练
H5 module suspension drag effect
Get class files and attributes by reflection
[algorithm post interview] interview questions of a small factory
Sre core system understanding
Using handler in a new thread
SRE核心体系了解