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

正文內(nèi)容

matlab程序設(shè)計(jì)語(yǔ)言(2)-閱讀頁(yè)

2025-01-27 18:54本頁(yè)面
  

【正文】 例 57 cellplot 功能:以圖形方式顯示出單元陣列的結(jié)構(gòu) 格式: cellplot(c) cellplot(c,39。) handles = cellplot(...) 說(shuō)明: cellplot(c)可以以圖形形式表示 c的內(nèi)容,填充了顏色的方塊用于表示陣列和向量的元素,標(biāo)量和短的文本字串則會(huì)直接進(jìn)行顯示。 handles = cellplot(c),可在畫(huà)出單元陣列圖之外,還得 得到了圖形句柄。 格式: c = num2cell(A) c = num2cell(A,dims) 說(shuō)明: c = num2cell(A)可將陣列 A的元素放入相應(yīng)單元陣列 c的位置, c的尺寸與 A的相同。 例 59 cell2struct 功能:?jiǎn)卧嚵凶儞Q成結(jié)構(gòu)陣列 格式: s = cell2struct(c,fields,dim) 說(shuō)明: s = cell2struct(c,fields,dim)可將單元陣列的指定維轉(zhuǎn)變成域名維 fields的結(jié)構(gòu) s,因此 c在 dim維的長(zhǎng)度必須與域名的數(shù)目相同。 例 60 struct2cell 功能:結(jié)構(gòu)陣列變換成單元陣列 格式: c = struct2cell(s) 說(shuō)明:將 m n結(jié)構(gòu) s(有 p個(gè)域 )變換成p m n單元陣列 c。 62 cellstr 功能:從字符陣列中建立單元陣列 格式: c = cellstr(S) 說(shuō)明:將字符陣列 s中的每一行放入 c的獨(dú)立單元中,從而構(gòu)成單元陣列 c。layer 239。 3 4]。layer 339。 A A = [5x5 double] {2x2 cell} A{1,2} ans= 39。 [2x2 double] [1x2 double] {1x2 cell } A{1,2}{2,2} ans= 39。 [1] 返回 66 例 利用 cell函數(shù)建立嵌套單元陣列 A = cell(1,2); A(1,1) = {magic(4)}; A(1,2) = {cell(2,2)}; A{1,2}(1,1) = {39。}。 3 4]}。 A{1,2}(2,2) = {{39。 1}}。 [X1,X2] = ndgrid(2:.4:2, 2:.4:2)。 mesh(Z)。 3 4]。 Y = permute(X,[2 3 1])。 C = ipermute(B,[3 2 1])。 [b,n] = shiftdim(a)。 % c == a. d = shiftdim(a,3)。type39。big39。little39。color39。red39。x39。 mystr(1,1).ID = 0; mystr(2,1).name = ‘gertrude’。 n = fieldnames(mystr) n = ‘name’ ‘ID’ 返回 75 例 getfield 給定結(jié)構(gòu) mystr(1,1).name = 39。 mystr(1,1).ID = 0。gertrude39。name39。name39。 end name name = 39。 39。 返回 76 例 setfield 給定結(jié)構(gòu): mystr(1,1).name = 39。 mystr(1,1).ID = 0。gertrude39。 然后輸入: mystr = setfield(mystr,{2,1},39。,39。)。John Doe39。 = [79 75 73。 220 210 205]。billing39。Tony39。 [1 2。abc39。 celldisp(C) C{1,1} = 1 2 C{2,1} = 1 2 3 4 C{1,2} = Tony C{2,2} = 5 C{1,3} = + C{2,3} = abc 返回 79 例 num2cel A = fix(20*rand(4,4)) A = 19 17 16 18 4 15 8 14 12 9 12 3 9 0 15 8 c = num2cell(A) c = [19] [17] [16] [18] [ 4] [15] [ 8] [14] [12] [ 9] [12] [ 3] [ 9] [ 0] [15] [ 8] 80 例 num2cel c = num2cell(A,2) %將第二維(行)放入單元 c = [1x4 double] [1x4 double] [1x4 double] [1x4 double] celldisp(c) c{1} = 19 17 16 18 c{2} = 4 15 8 14 c{3} = 12 9 12 3 c{4} = 9 0 15 8 返回 81 例 cell2struct c = {39。,39。,65。maple39。acer39。birch39。betula39。maple39。acer39。name39。genus39。height39。 s = cell2struct(c, fields, 2)。birch39。maple39。betula39。acer39。tree39。 = 39。 建立結(jié)構(gòu) s = category: 39。 height: name: 39。 c = struct2cell(s) %將結(jié)構(gòu)陣列變換為單元陣列 c = 39。 [] 39。 返回 83 例 cellstr S=[39。 39。 39。] % S為字符陣列 S = abc defg hi whos S Name Size Bytes Class S 3x4 24 char array 84 例 cellstr c = cellstr(S) % c為單元陣列 c = 39。 39。 39。 whos c Name Size Bytes Class c 3x1 198 cell array 返回 85 例 deal C = {rand(3) ones(3,1) eye(3) zeros(3,1)}。Pat39。 A(2).name = 39。 A(2).number = 901325
點(diǎn)擊復(fù)制文檔內(nèi)容
環(huán)評(píng)公示相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1