当前位置:网站首页>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 ÿ
边栏推荐
- Positive height system
- 'mongoexport 'is not an internal or external command, nor is it a runnable program or batch file.
- Xiaomi written test real question 1
- MPLS experiment
- PHY驱动调试之 --- MDIO/MDC接口22号和45号条款(一)
- What is linting
- SD_CMD_SEND_SHIFT_REGISTER
- The problem of Chinese garbled code in the vscode output box can be solved once for life
- 你心目中的数据分析 Top 1 选 Pandas 还是选 SQL?
- Vscode editor
猜你喜欢
The problem of Chinese garbled code in the vscode output box can be solved once for life
[MySQL 8.0 does not support capitalization of table names - corresponding scheme]
ROS2——安装ROS2(三)
MySQL (UDF authorization)
UTC, GPS time and Tai
Ret2xx---- common CTF template proposition in PWN
LSA Type Explanation - lsa-1 [type 1 LSA - router LSA] detailed explanation
Genesis builds a new generation of credit system
C语言数组专题训练
ROS2——功能包(六)
随机推荐
SOC_SD_CMD_FSM
GDB code debugging
The route of wechat applet jumps again without triggering onload
扫盲-以太网MII接口类型大全-MII、RMII、SMII、GMII、RGMII、SGMII、XGMII、XAUI、RXAUI
Preemption of CFS scheduling
Xavier CPU & GPU 高负载功耗测试
【软件测试】05 -- 软件测试的原则
How to answer when you encounter a jet on CSDN?
Getting started with typescript
【软件测试】03 -- 软件测试概述
Skywalking all
Technical conference arrangement
Volcano resource reservation feature
.net core踩坑实践
使用paping工具进行tcp端口连通性检测
ROS2——node节点(七)
7. Oracle table structure
Rehabilitation type force deduction brush question notes D1
new和malloc的区别
Positive height system