Matlab基础操作笔记[1]
Matlab矩阵堆叠
![](https://x2.mday.top/wp-content/uploads/2021/10/image-34.png)
Matlab点运算
![](https://x2.mday.top/wp-content/uploads/2021/10/image-35.png)
Matlab矩阵运算
![](https://x2.mday.top/wp-content/uploads/2021/10/image-36.png)
初始化矩阵
![](https://x2.mday.top/wp-content/uploads/2021/10/image-37.png)
等差数列
![](https://x2.mday.top/wp-content/uploads/2021/10/image-38.png)
![](https://x2.mday.top/wp-content/uploads/2021/10/image-39.png)
矩阵的getitem和其他语言不同,从1开始
最下面蓝色字是提取A中的特定行列组成新矩阵
![](https://x2.mday.top/wp-content/uploads/2021/10/image-40.png)
![](https://x2.mday.top/wp-content/uploads/2021/10/image-41.png)
读取图片
img = imread("lena.jpg")
imshow(img)
![](https://x2.mday.top/wp-content/uploads/2021/10/image-42.png)
函数声明
![](https://x2.mday.top/wp-content/uploads/2021/10/image-43.png)
Plot画图
x=linspace(0,4*pi,10);
y=sin(x);
plot(x,y)
![](https://x2.mday.top/wp-content/uploads/2021/10/image-44-1024x924.png)
增加线样式
![](https://x2.mday.top/wp-content/uploads/2021/10/image-45.png)
title(‘sin(x)’)可以加标题到plot上面
subplot(m,n,p)
奖plot图分割成m*n个部分,并将原图放在p号位
![](https://x2.mday.top/wp-content/uploads/2021/10/image-46.png)
逻辑符号,注意非
![](https://x2.mday.top/wp-content/uploads/2021/10/image-47.png)
![](https://x2.mday.top/wp-content/uploads/2021/10/image-48.png)
if else
![](https://x2.mday.top/wp-content/uploads/2021/10/image-49.png)
for
![](https://x2.mday.top/wp-content/uploads/2021/10/image-50.png)
while
![](https://x2.mday.top/wp-content/uploads/2021/10/image-51.png)
find
![](https://x2.mday.top/wp-content/uploads/2021/10/image-52-1024x174.png)
矩阵运算代替循环
![](https://x2.mday.top/wp-content/uploads/2021/10/image-53.png)
![](https://x2.mday.top/wp-content/uploads/2021/10/image-54.png)