当前位置:网站首页>Matlab求解线性方程组Ax=b
Matlab求解线性方程组Ax=b
2022-06-24 06:59:00 【马少爷】
法1:左除法
>> A=[3 1 -1;1 2 4;-1 4 5];B=[3.6;2.1;-1.4];
>> x=A\B
输出:
x =
1.4818
-0.4606
0.3848
法2:求逆法
>> A=[3 1 -1;1 2 4;-1 4 5];b=[3.6;2.1;-1.4];
>> x=inv(A)*b
x2 =
1.4818
-0.4606
0.3848
法3:用linsolve函数求解
>> A=[3 1 -1;1 2 4;-1 4 5];b=[3.6;2.1;-1.4];
>> x=linsolve(A,b)
x3 =
1.4818
-0.4606
0.3848
法4:用solve函数求解
>> [x1 x2 x3]=solve('3*x1+x2-x3=3.6','x1+2*x2+4*x3=2.1','-x1+4*x2+5*x3=-1.4')
x1 =
1.4818181818181818181818181818182
x2 =
-0.46060606060606060606060606060606
x3 =
0.38484848484848484848484848484848
法5:广义逆求解
>> A=[3 1 -1;1 2 4;-1 4 5];b=[3.6;2.1;-1.4];
>> x=pinv(A,b)
x4 =
1.4818
-0.4606
0.3848
边栏推荐
- How to improve the customer retention rate in the operation of independent stations? Customer segmentation is very important!
- Longhorn installation and use
- 05 Ubuntu installing mysql8
- 新准则金融资产三分类:AMC、FVOCI和FVTPL
- Understanding of the concept of "quality"
- 12-- merge two ordered linked lists
- Easydss anonymous live channel data volume instability optimization scheme sharing
- 2021-06-24: find the length of the longest non repeating character substring in a string.
- LabVIEW finds prime numbers in an array of n elements
- ZUCC_ Principles of compiling language and compilation_ Experiment 08 parsing LR parsing
猜你喜欢

ZUCC_编译语言原理与编译_实验03 编译器入门

Pat 1157: school anniversary

RCNN、Fast-RCNN、Faster-RCNN介绍
![[untitled]](/img/94/792e8363dbfe67770e93b0dcdc8e72.png)
[untitled]

Permission model DAC ACL RBAC ABAC

2022 mobile crane driver special operation certificate examination question bank and online simulation examination

Question 3 - MessageBox pop-up box, modify the default background color

Longhorn installation and use

Understanding of the concept of "quality"

独立站运营中如何提升客户留存率?客户细分很重要!
随机推荐
12--合并两个有序链表
Getting started with ffmpeg
Blue screen error UNMOUNTABLE boot volume of the solution
os. path. Pits encountered during the use of join()
Permission model DAC ACL RBAC ABAC
JS scroll div scroll bar to bottom
Win10 cloud, add Vietnamese
Five level classification of loans
dhcp、tftp基础
A preliminary study of IO model
ZUCC_编译语言原理与编译_大作业
2022 mobile crane driver special operation certificate examination question bank and online simulation examination
2021-03-16 COMP9021第九节课笔记
ZUCC_ Principles of compiling language and compilation_ Experiment 02 fsharp Ocaml language
ZUCC_编译语言原理与编译_实验01 语言分析与简介
ZUCC_编译语言原理与编译_实验08 语法分析 LR 分析
RCNN、Fast-RCNN、Faster-RCNN介绍
Live broadcast appointment: growth of Mengxin Product Manager
Common CVM transcribes audio using virtual sound card
[acnoi2022] not a structure, more like a structure