zoukankan      html  css  js  c++  java
  • 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

    本博客专注于错误锦集,在作死的边缘试探
  • 相关阅读:
    P4016 负载平衡问题 网络流
    P3357 最长k可重线段集问题 网络流
    mysql部署
    pve配置
    PVE手册资料
    PVE授权条款
    ovirt磁盘类型(IDE, virtio, virtio-scsi)
    oVirt-postgresql
    ovirt常用后台维护命令
    oVirt部署
  • 原文地址:https://www.cnblogs.com/SweetBeens/p/6661738.html
Copyright © 2011-2022 走看看