freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

matlab入門第一、二章matlab入門-資料下載頁

2025-01-07 12:20本頁面
  

【正文】 b 必須具有相同的維數(shù)。 符號“ . \ ”或 “. / ”,運算結果相同, a.\b 表示 b 中的元素分別除以 a 中的對應元素 ,即z(i,j)=x(i,j)\y(i,j)=y(i,j)/x(i,j)。 如: x=[1 2 3]。 y=[4 5 6]。 z=x.\y z = 3. 乘方 (Power) (1) 矩陣的乘方 (Matrix power) 條件: 在 a^p 中 a, p 不可 都是矩陣,必須一個是標量,一個是方陣 。 a^p 意思是 a 的 p 次方。 *A 是一個方陣, p 是一個標量,且 p 是大于 1 的整數(shù),則 a 的p 次冪即為 a 自乘 p 次。 *如 p 是不為整數(shù)的標量時, a^p=V*D.^p/V 其中 D 為矩陣 a的特征值矩陣 ,V 為對應的特征矢量陣,可用 eig 函數(shù)求出 D 和 V, [V,D]=eig(a). *當 p 是方陣而 a 是標量時 , a^p=V*a.^D/V, 其中 [V,D]=eig(p). (2) 數(shù)組的乘方 (Array power) 符號 “ .^ ” 條件: 在 底與指數(shù)均為數(shù)組的情況下,要求他們的維數(shù)必須相同。 *當?shù)缀椭笖?shù)為同樣大小的數(shù)組時, x.^y 為對應的元素做乘方運算。如: x=[1 2 3]。 y=[4 5 6]。 z=x.^y z = 1 32 729 這時執(zhí)行的實際運算為: z=x.^y=[1 2 3].^[4 5 6]=[1^4 2^5 3^6]=[1 32 729] *若指數(shù)是標量,執(zhí)行的運算是底的每一個元素執(zhí)相同冪次的運算。既z(i,j)=x(i,j)^2 如: x=[1 2 3]。 z=x.^2 得到結果 為: z= 1 4 9 這時執(zhí)行的運算為: z=[1 2 3].^2=[1^2 2^2 3^2]=[1 4 9] *若底是一個標量,指數(shù)是一個數(shù)組,執(zhí)行的運算是用指數(shù)數(shù)組的每個元素對底進行乘方運算,即: z(i,j)=2^x(i,j),形成新的數(shù)組。 如: x=[1 2 3]。 z=2.^x z = 2 4 8 這時執(zhí)行的運算為: z=2.^x=2.^[1 2 3]=[2^1 2^2 2^3] 4. 轉(zhuǎn)置: (Transpose) 行列轉(zhuǎn)置,符號 “ ‘ ” 如;計算矩陣 a 的轉(zhuǎn)置: a=[1 2 3。 4 5 6。 7 8 9 ]。 b=a? b = 1 4 7 2 5 8 3 6 9 也可直接對矢量或矩陣進行轉(zhuǎn)置運算; [1 0 2]? ans = 1 0 2 如 z 是復數(shù)矩陣,則 z? 是它的復數(shù)共軛 .轉(zhuǎn)置 (Complex conjugate transpose ),若要進行非共軛轉(zhuǎn)置運算,可使用 z.? 或 conj(z?) 求得。 例; z=[1+2i 3+4i]。 z? ans = z=[1+2i 3+4i]。 z.? ans = + + z=[1+2i 3+4i]。 conj(z?) ans = + + CONJ Complex conjugate. CONJ(X) is the plex conjugate of X. For a plex X, CONJ(X) = REAL(X) i*IMAG(X). 二. 數(shù)學函數(shù)和矩陣函數(shù) ( Mathematic function and matrix function) MATLAB 提供的數(shù)學函數(shù)主要有基本函數(shù)和特殊函數(shù)兩部分。 1. 數(shù)學函數(shù) (Math function) (a). 基本函數(shù) : (Elementary function)三角函數(shù) (Trigonometric Function)、指數(shù)函數(shù) (Exponent function)、復數(shù)函數(shù) (Complex Function)、取整和求余函數(shù) (round and remain function)。(常用基本函數(shù)見函數(shù)表,要求課后閱讀、記憶) 例 : a=[1 2 3。 4 5 6] b=fix(pi*a) %朝零方向取整 c=cos(pi*b) pi*b a = 1 2 3 4 5 6 b = 3 6 9 12 15 18 c = 1 1 1 1 1 1 ans = 說明:( 1) 三角函數(shù)按弧度計算 ( 2) 除后取模 mod(x,y)與 y 符號相同, 除后取余數(shù) rem(x,y) 與 x 符號相同,當 x 與 y 符號相同時 , mod(x,y)等于 rem(x,y). 例: x=[11 25 31]。 y=[4 5 6]。 M=mod(x,y) R=rem(x,y) M = 3 0 1 R = 3 0 1 x=[11 25 31]。 y=[4 5 6]。 M=mod(x,y) R=rem(x,y) M = 1 0 5 R = 3 0 1 MOD Modulus after division. MOD(x,y) is x n.*y where n = floor(x./y) if y ~= 0. ( Round towards minus infinity.) If y is not an integer and the quotient x./y is within round off error of an integer, then n is that integer. By convention, MOD(x,0) is x. The input x and y must be real arrays of the same size, or real scalars. The statement x and y are congruent mod m means mod(x,m) == mod(y,m). REM Remainder after division. REM(x,y) is x n.*y where n = fix(x./y) if y ~= 0. ( Round towards zero) . If y is not an integer and the quotient x./y is within roundoff error of an integer,then n is that integer. By convention, REM(x,0) is NaN. The input x and y must be real arrays of the same size, or real scalars. REM(x,y) has the same sign as x while MOD(x,y) has the same sign as y. REM(x,y) and MOD(x,y) are equal if x and y have the same sign, but differ by y if x and y have different signs. (b) 特殊函數(shù): (Special function)特殊數(shù)學函數(shù) (special mathematics function)、數(shù)理函數(shù) (Mathematic analysis function)、坐標變換 (Coordinates transformation function)。 2. 矩陣函數(shù): (Matrix function) 矩陣分析 (Matrix Analysis)、線性方程組 (linear system of equations)、特征值和特征矢量 (Eigenvalues and eigenvectors.)、矩陣函數(shù) (Matrix function)、因式分解 (Factor analysis) 等矩陣函數(shù)。 有些矩陣函數(shù)與數(shù)學函數(shù)名稱相似,區(qū)別在于矩陣函數(shù)名稱后有 m字符。 例: a=[1 4。 9 16]。 r1=sqrt(a) r2=sqrtm(a) r1 = 1 2 3 4 r2 = + + SQRT Square root. SQRT(X) is the square root of the elements of X. Complex results are produced if X is not positive. SQRTM Matrix square root. X = SQRTM(A) is the principal square root of the matrix A, . X*X = A. X is the unique square root for which every eigenvalue has nonnegative real part. If A has any eigenvalues with negative real parts then a plex result is produced. If A is singular then A may not have a square root. A warning is printed if exact singularity is detected. 三. 關系運算與邏輯運算 (Relational calculus and Logical operation) 1.關系運算: (Relational calculus) 條件: 對于兩個矩陣的關系運算,兩邊的矩陣必須具有同樣尺寸。MATLAB 把任何非 0 的數(shù)值都當作真,把 0 當作假,關系運算的結果非真( 1)即假( 0)。 關系運算符: (Relational operator) ﹤ 小于 (less than)、﹤ =小于等于 (less than or equal to)、﹥大于 ( greater than) 、 ﹥ =大于等于 (greater than or equal to)、 == 等于 (equal to)、~ =不等于 (not equal to ,NE)。 例:標量 2+2~=4 ans = 0 矩陣 關系運算,對應元素進行關系運算 : a=[0 1 2]。 b=[3 1 2]。 ab ans = 0 1 0 a=b ans = 0 1 1 ab ans = 1 0 0 a=b ans = 1 0 1 a==b ans = 0 0 1 a~=b ans = 1 1 0 在程序的流程控制中,關系運算符通常 if, while, for, switch 等控制命令使用。 2. 邏輯運算 (Logical operation) 與關系運算類似,運算結果非真即假。 邏輯運算符 : (Logical operator) amp。 與 ( AND) , | 或 ( OR) , ~ 非 ( NOT) 條件: 對于兩個矩陣的邏輯運算,兩邊的矩陣必須具有同樣尺寸。 如果其中一個為標量,則標量逐個與 矩陣中的每一個元素進行邏輯運算。 “~” 是一元算符,當 a 為零時,返回信息為 1,為非零時,返回信息為 0。 p|(~p) 返回值為 1, pamp。(~p) 返回值為 0 例: 矩陣邏輯運算,對應元素進行邏輯運算: a=[1 2 3。 4 5 6]。 b=[1 0 0。 0 0]。 aamp。b ans = 1 0 0 0 1 0 a|b ans = 1 1 1 1 1 1 ~b ans = 0 1 1 1 0 1 3.關系函數(shù)和邏輯函數(shù) (Relational function and Logical function) MA
點擊復制文檔內(nèi)容
公司管理相關推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1