⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 05-26.txt

📁 《MATLAB简明教程》俺买的最新版的MATLAB教材
💻 TXT
字号:
>> student.test=[99 56 96 87 67 69 87 76 92];
>> student.name='Wu Qing';
>> student.weight=68;
>> student.height=1.72;
>> student.num=2003214091;
>> student.add='School of civil engneering.Tsinghua university';
>> student.tel='1381042679*';
%输入student,即可以在命令窗口中输出student的内容。
>> student
student = 
      test: [99 56 96 87 67 69 87 76 92]
      name: Wu Qing 
      weight: 68
      height: 17200
      num: 2003214091
      add: 'School of civil engneering.Tsinghua university'
      tel: '1381042679*'
>>
%用户还可以通过以下形式的语句以添加新的结构型变量(另外的学生数据)。
>> student(2).test=[99 65 88 78 76 98 75 96 59];
%系统将默认之前的student为student(1)
>> student(2).name='Wei Huan';   
>> student(2).weight=50;
>> student(2).height=1.58;
>> student(2).num=034999;
>> student(2).add='School of Psychology.Chongqing university';
>> student(2).tel='02361703456';
%此时,输入student,将只得到该结构的成员变量名而不显示内容,
student
student = 
1x2 struct array with fields:
    test
    name
    weight
    height
    num
    add
    tel
>>
%可以继续在命令窗口中查询student的具体内容。
>> student(1)
ans = 
      test: [99 56 96 87 67 69 87 76 92]
      name: ' Wu Qing '
      weight: 68
      height: 1.7200
      num:2003214091
      add: [1x46 char]
      tel: '1381042679*'
>> student(2)
ans = 
      test: [99 65 88 78 76 98 75 96 59]
      name: 'Wei Huan'
      weight: 50
      height: 1.5800
      num: 34999
      add: 'School of Psychology.Chongqing university'
      tel: '02361703456'
>>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -