?? 05-27.txt
字號:
%例5-27 使用struct函數生成結構型變量。
%解:在命令窗口中輸入如下命令,并按Enter鍵確認。
>> truct_array=struct('d',{{北京','上海'}},'strengths',[40000 1000])
truct_array =
d: {'北京' '上海'}
strengths: [40000 1000]
>>
用戶也可以一次輸入多個變量的值,輸入格式如下。
>> s = struct('type',{'big','little'},'color','red','x',{3 4})
s =
1x2 struct array with fields:
type
color
x
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -