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

正文內(nèi)容

matlab的基本使用方法-在線(xiàn)瀏覽

2025-07-13 18:40本頁(yè)面
  

【正文】 據(jù)類(lèi)型 的上限或者下限 2021/6/15 22 x=double(x),y=double(y) x = 30 y = 15 y/x ans = z=y/x z = z=int8(z) z = 1 2021/6/15 23 方式一: datatype(variable) 例: x=int8() x = 5 方式二: cast(x,’ type’ ) 例: y=cast(,39。) y = 5 class(y) ans = int8 各種數(shù)據(jù)類(lèi)型之間的轉(zhuǎn)換 : 2021/6/15 24 不同整數(shù)類(lèi)型之間不能進(jìn)行運(yùn)算 x=int8(5) x = 5 y=int16(23) y = 23 z=x+y ??? Error using == plus Integers can only be bined with integers of the same class, or scalar doubles. 2021/6/15 25 浮點(diǎn)數(shù) ?MATLAB 的默認(rèn)數(shù)據(jù)類(lèi)型是雙精度類(lèi)型( double)。 ?創(chuàng)建單精度類(lèi)型的變量時(shí)需要聲明變量類(lèi)型,與創(chuàng)建整型變量類(lèi)似。 2021/6/15 26 realmin(‘ single’ ), realmax(39。) ans = ans = +038 eps(39。) ans = realmin(‘double’), realmax(39。) ans = ans = +308 eps(39。) ans = 例 212 單精度和雙精度數(shù)據(jù)類(lèi)型的取值范圍和精度 2021/6/15 27 ? MATLAB的所有運(yùn)算是定義在復(fù)數(shù)域上 . ? MATLAB中虛數(shù)單位用 i或者 j表示 ? 通過(guò)兩種方法創(chuàng)建復(fù)數(shù): 1. 直接輸入法 (不建議大家使用) 2. 通過(guò) plex 函數(shù) 2021/6/15 30 plex 函數(shù)的調(diào)用方法如下。輸入?yún)?shù) a 和 b 可以為標(biāo)量,或者維數(shù)、大小相同的向量、矩陣或者多維數(shù)組,輸出參數(shù)和 a 和 b 的結(jié)構(gòu)相同。 2021/6/15 31 x=int8(2),y=int8(3) x = 2 y = 3 z2=plex(x,y) z2 = 2 + 3i plex()創(chuàng)建單個(gè)復(fù)數(shù) 2021/6/15 32 a=int8([1 2 3 4]) a = 1 2 3 4 b=int8([2 3 4 5]) b = 2 3 4 5 c=plex(a,b) c = 1 + 2i 2 + 3i 3 + 4i 4 + 5i plex()創(chuàng)建復(fù)數(shù)數(shù)組 2021/6/15 33 復(fù)數(shù)直角坐標(biāo)和極坐標(biāo)之間轉(zhuǎn)換 ?real(z): 給出復(fù)數(shù) z的實(shí)部 ?imag(z):給出復(fù)數(shù) z的虛步 ?abs(z):給出 z的模 ?angle(z):以弧度為單位給出復(fù)數(shù) z的幅角 2021/6/15 34 ?c = plex(a),只有一個(gè)輸入?yún)?shù),返回結(jié)果 c 為復(fù)數(shù),其實(shí)部為 a,虛部為 0。 x=int8(x) x = 2 c=plex(x) c = 2 isreal(c) ans = 0 d=plex(a) d = 1 2 3 4 isreal(d) ans = 0 e=x+0*i e = 2 isreal(e) ans = 1 isreal(x)判斷 x是否為實(shí)數(shù) 2021/6/15 35 1. 邏輯變量的值:邏輯真 (1)、邏輯假 (0) MATLAB 函數(shù)或操作符會(huì)返回邏輯真或邏輯假表示條件是否滿(mǎn)足。 3. 邏輯數(shù)組:數(shù)組的元素全部是邏輯值。 (and), | (or), ~ (not), xor, any, all 邏輯操作符 amp。, || “并”和“或”的簡(jiǎn)寫(xiě)方式 == (eq), ~= (ne), (lt), (gt), = (le), = (ge) 關(guān)系操作符 所有的 is* 類(lèi)型的函數(shù), cellfun 判斷函數(shù) strcmp, strncmp, strcmpi, strncmpi 字符串比較 MATLAB 中返回邏輯值的函數(shù)和操作符 2021/6/15 38 邏輯數(shù)組的應(yīng)用 1. 用于條件表達(dá)式 如果僅當(dāng)條件成立時(shí)執(zhí)行某段代碼,可以應(yīng)用邏輯數(shù) 組進(jìn)行判斷和控制 str=39。 str = hello if ~isempty(str)amp。ischar(str) sprintf(39。,str) end ans = input string is hello 2021/6/15 39 在 MATLAB 中支持通過(guò)一個(gè)數(shù)組對(duì)另一個(gè)數(shù)組進(jìn)行索 引 a=1:2:10 a = 1 3 5 7 9 b=[1 3 5 ] b = 1 3 5 a(b) ans = 1 5 9 2021/6/15 40 通過(guò)邏輯數(shù)組對(duì)數(shù)組進(jìn)行索引 a=rand(3) a =
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1