octave矩阵运算

A.*B A点乘B就是对应元素直接相乘

A.^2直接每个元素平方

log(e)=1

exp(1)=e

abs(-1)=1

1*B做除法必须1./B

[value,index]=max(a)最大的元素的位置,value是它的大小,index是他的位置

Max(A)会返回一个维度值个数的较大值

1 5 7

2 4 6会返回5 6 7,

A<3 return  if it's smaller than 3

[roll, colum]=find (A<3) returns the position when it's smaller than 3

magic(3) returns a magic square which sum of each row=sum of each collum 甚至是对角线。

sum(a);prod(a);floor(a);ceil(a);prod means *;floor means 0.4~~=0

max(rand(3),rand(3)) pick the bigger one in each count position,no max(rand(3),rand(3),rand(3));

I'm sneezing like in every 2 second,god help my nose.

max(A,[],1/2)行最大,列最大

flipud(eye(2))是上下对称一下

1 0      0 1

0 1=》 1 0

plot(x,y);%x=[0:0.1:1];

hold on;

xlable('size');

legend('name1','name2')

title('my pic')

print -dpng 'name';  

figure(1);plot(t,y1);

subplot(1,2,1);分成横向一个,纵向两个的格子,用第一个作图

axis([0.5 1 -1 1])

clf;

imagesc(A)

iamgesc,colorbar,colormap gray

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值