范数,是具有“长度”概念的函数。在线性代数、泛函分析及相关的数学领域,范数是一个函数,其为矢量空间内的所有矢量赋予非零的正长度或大小。半范数反而可以为非零的矢量赋予零长度。

1、向量范数

1-范数:,即向量元素绝对值之和,matlab调用函数norm(x, 1) 。

2-范数:,Euclid范数(欧几里得范数,常用计算向量长度),即向量元素绝对值的平方和再开方,matlab调用函数norm(x, 2)。

∞-范数:,即所有向量元素绝对值中的最大值,matlab调用函数norm(x, inf)。

-∞-范数:,即所有向量元素绝对值中的最小值,matlab调用函数norm(x, -inf)。

p-范数:,即向量元素绝对值的p次方和的1/p次幂,matlab调用函数norm(x, p)。

2、矩阵范数

1-范数:, 列和范数,即所有矩阵列向量绝对值之和的最大值,matlab调用函数norm(A, 1)。

2-范数:,谱范数,即A'A矩阵的最大特征值的开平方。matlab调用函数norm(x, 2)。

-------------------- norm--------------------

matlab里,doc norm的结果:

Description The norm function calculates several different
types of matrix and vector norms. If the input is a vector or a matrix:n = norm(X,2) returns the2-norm of X.

n = norm(X) is the same as n = norm(X,2).

n = norm(X,1) returns the 1-norm of X.

n = norm(X,Inf) returns the infinity norm of X.

n = norm(X,'fro') returns the Frobenius norm of X.

In addition, when the input is a vector v:n = norm(v,p) returns the p-norm of v.

The p-norm is sum(abs(v).^p)^(1/p).n = norm(v,Inf) returns the largest element of abs(v).

n = norm(v,-Inf) returns the smallest element of abs(v).

---------------------cross--------------------

matalb,doc cross:

Syntax
C = cross(A,B)
C = cross(A,B,dim)
Description
C = cross(A,B) returns the cross product of A and B.
•If A and B are vectors, then they must have a length of 3.
•If A and B are matrices or multidimensional arrays, then they must have the same size. In this case, the cross function treats A and B as collections of three-element vectors. The function calculates the cross product of corresponding vectors along the first array dimension whose size equals 3.
C = cross(A,B,dim) evaluates the cross product of arrays A and B along dimension, dim. A and B must have the same size, and both size(A,dim) and size(B,dim) must be 3. The dim input is a positive integer scalar.

C = cross(A,B)返回向量叉积A和B,即,C = A x B,A和B必须是3元向量。

--------------- --makehgtform---------------

matlab,doc makehgtform:

Syntax
M = makehgtform
M = makehgtform('translate',[tx ty tz])
M = makehgtform('scale',s)
M = makehgtform('scale',[sx,sy,sz])
M = makehgtform('xrotate',t)
M = makehgtform('yrotate',t)
M = makehgtform('zrotate',t)
M = makehgtform('axisrotate',[ax,ay,az],t)

Description
Use makehgtform to create transform matrices for translation, scaling, and rotation of graphics objects. Apply the transform to graphics objects by assigning the transform to the Matrix property of a parent hgtransform object. See Examples for more information.

M = makehgtform returns an identity transform.
M = makehgtform('translate',[tx ty tz]) or M = makehgtform('translate',tx,ty,tz) returns a transform that translates along the x-axis by tx, along the y-axis by ty, and along the z-axis by tz.
M = makehgtform('scale',s) returns a transform that scales uniformly along the x-, y-, and z-axes.
M = makehgtform('scale',[sx,sy,sz]) returns a transform that scales along the x-axis by sx, along the y-axis by sy, and along the z-axis by sz.
M = makehgtform('xrotate',t) returns a transform that rotates around the x-axis by t radians.
M = makehgtform('yrotate',t) returns a transform that rotates around the y-axis by t radians.
M = makehgtform('zrotate',t) returns a transform that rotates around the z-axis by t radians.
M = makehgtform('axisrotate',[ax,ay,az],t) Rotate around axis [ax ay az] by t radians.

---------------------asin----------------------

matlab中asin是一个求反正弦的函数
注1:asin(x)中x的取值范围为:-1<=x<=1
注2:asin计算出来的结果是以弧度制表示的。

使用方法如下:
a = sin(pi/6); % 计算结果为0.5
b = asin(a); % 计算结果为0.5236 = pi/6(弧度制表示)

最后,附个matlab综合实例:

>> A=[1,2,2]A =1     2     2
>> norm_A=norm(A)//求得A的2范数norm_A =3>> B=[2 1 2]B =2     1     2>> CROSS_AB=cross(A,B) //求得AB面的法向量CROSS_AB =2     2    -3
>> M=makehgtform('xrotate',pi/2) //M为绕着X轴旋转90度的旋转矩阵M =1     0     0     00     0    -1     00     1     0     00     0     0     1

参考:

http://blog.csdn.net/left_la/article/details/9159949

http://www.cnblogs.com/sddai/p/5433346.html

http://yishouce.com/matlab/func/makehgtform

Matlab运算之 norm,cross,makehgtform,asin(acos)相关推荐

  1. matlab中voa,matlab 运算出错 function [w1,w2,VoA,VoB,VoC,VoD,VoE,VA1,VB1,VC1,

    matlab 运算出错 function [w1,w2,VoA,VoB,VoC,VoD,VoE,VA1,VB1,VC1, matlab 运算出错 function [w1,w2,VoA,VoB,VoC ...

  2. matlab 运算子图_PHP运算子

    matlab 运算子图 Today we will look into PHP operators. Earlier we went through PHP tutorial for beginner ...

  3. 重写Math 中sin cos asin  acos 方法,将其入参或者返回值 从弧度改为角度

    Math 中sin cos 方法的入参 单位是弧度,而我们在数学公式中填写的都是角度: Math 中asin  acos 方法的返回值 单位是弧度,而我们在数学公式中arcsin  arccos返回值 ...

  4. MATLAB运算总结(一)超详细

    1:乘方号^;如2的三次方即2^3.规则从左到右,先乘除后加减,否则加小括号.三角函数直接写入,圆周率Π:pi.表示e:exp(n)表示e的n次方.log()表示以e为底的对数.log2()表示以2为 ...

  5. C++中cos,sin,asin,acos这些三角函数操作

    C++中cos,sin,asin,acos这些三角函数操作的是弧度,而非角度, 你需要把角度转化为弧度. 弧度=角度*Pi/180; 例子1: 比如对边和邻边分别为a,b  设角度为x,则  x=at ...

  6. C++中cos,sin,asin,acos这些三角函数操作的是弧度,而非角度,

    C++中cos,sin,asin,acos这些三角函数操作的是弧度,而非角度, 你需要把角度转化为弧度. 弧度=角度*Pi/180; 例子1: 比如对边和邻边分别为a,b  设角度为x,则  x=at ...

  7. matlab中norm a b,matlab中范数norm(A)

    matlab中范数norm(A) (2013-08-09 17:40:33) 格式:n=norm(A,p) 功能:norm函数可计算几种不同类型的矩阵范数,根据p的不同可得到不同的范数 以下是Matl ...

  8. 实验一 MATLAB 运算基础

    实验一 MATLAB 运算基础 目录 实验一 MATLAB 运算基础 1.1实验目的 1.2实验内容 1.3流程图 1.4程序清单 1.5运行结果 1.6实验的收获与体会 1.1实验目的 1,熟悉启动 ...

  9. 弗罗贝尼乌斯范数 matlab,【Frobenius norm(弗罗贝尼乌斯-范数)(F-范数)】

    (1)Frobenius 范数(F-范数) 一种矩阵范数,记为:. 即矩阵中每项数的平方和的开方值. 这个范数是针对矩阵而言的,具体定义可以类比 向量的L2范数. 可用于 利用低秩矩阵来近似单一数据矩 ...

  10. Matlab运算于内部函数,java后端校招面试题

    前言 在学习Java基础的过程中,泛型绝对算得上是一个比较难理解的知识点,尤其对于初学者而言,而且就算是已经有基础的Java程序员,可能对泛型的理解也不是那么透彻,属于那种看了明白,时间长了就忘的那种 ...

最新文章

  1. thinkpad e40 热键hotkey失效解决办法
  2. 从“埋点技术已死?”开始说起
  3. Python 内建函数
  4. 几个复制表结构和表数据的方法
  5. Java面试宝典系列之面试复习提纲
  6. Python学习:字典
  7. 6.prometheus数据上报方式-pushgateway
  8. 2014/School_C_C++_A/6/“数独”游戏
  9. HDU - 2122 Ice_cream’s world III
  10. 运行python manage.py runserver报错现象、原因和解决办法
  11. redis hash field过期时间_Redis系列-Redis数据类型
  12. 6.18-GTest
  13. 用Cython编译Python的C扩展
  14. git checkout -b
  15. c语言rc,RC低通滤波器中R和C参数选择
  16. linux root定时脚本,shell之定时周期性执行脚本的方法示例
  17. 超视频时代,数据洪峰何解?
  18. 【笔记】脉搏波手环自研之路开启
  19. linux 查看环境变量和修改环境变量
  20. Kubernetes1.23.5集群部署

热门文章

  1. =、:=、?=、+=
  2. 淡入淡出效果 (jQuery)
  3. 【php】利用php的构造函数与析构函数编写Mysql数据库查询类 (转)
  4. 0302-软件工程第一次作业
  5. Implement Stack using Queues
  6. NFinal ajax
  7. 如何为SQL Server2008添加登录账户并配置权限
  8. 教你一行代码解决 Git报错 fatal refusing to merge unrelated histories
  9. C++ coredump原因总结(转载)
  10. C++ 简单的SQL注入过滤