虚拟仪器3.数组介绍幻灯片.pptVIP

  • 6
  • 0
  • 约1.08万字
  • 约 49页
  • 2021-09-05 发布于浙江
  • 举报
索引数组index array 其他数组函数 数组归类(Sort) 删除元素(Delete) 求最值(Max/Min) 数组插入 数组抽取 旋转 线性插值与阈值(Interpolate And Threshold) 数组交插与抽取(Interleave And Decimate) 6.多态性 Scalar + Scalar Array + Scalar Combination Result Scalar Array Array 1 4 2 2 4 6 7 5 2 7 Array + Array 3 2 5 1 4 2 Array + Array 1 4 2 3 2 5 7 Array 3 6 4 4 6 7 互动练习 计算温度的均值,最大及最小值,图形和数字显示 调用子VI---activity—digital thermoter 演示:building array Separate array values 4. 互动练习 建立一电子表格,输出整数x ,x^2,sqrt(x)的值 8、簇 集中不同的数据类型 类似于 struct in C 簇中的对象必须全部是Control,或全是Indicator 象电线包入电缆中 簇常用操作 簇的建立 簇的序调整 簇的函数 1. 选择簇框架 8.1 簇的控件 2. 放入数据 8.2 簇常量 Select a Cluster Constant shell from the Cluster subpalette Right-click on existing cluster and select CreateConstant 8.3 簇的序 簇的元素有一个序,它与簇内元素的位置无关。 簇内第一个元素的序为0,第二个是1, 如果你想将一个簇与另一个簇连接,这两个簇的序和类型必须同一。 8.4 传送数据 若干数据到一端口 克服 28-端子限制 简化连线 8.5 簇的函数 Bundle建立新簇或替换簇中元素 将若干元素装配到一个新簇中 Unbundle Unbundle by name 8.6簇的多态功能 Polymorphic functions work with clusters Arithmetic functions can perform computations on clusters of numeric data 浮点数 数值类型 位数 小数位数 图标 单精度 32位 15-33 双精度 64位 15 扩展精度 128位 6 复数 数值类型 位数 小数位数 图标 单精度复数 64位 6 双精度复数 128位 15 扩展精度复数 256位 15-33 1.2 数据类型的确定 右键菜单-表示法 控件或显示器右键菜单-属性-数据类型 1.3 布尔型 布尔变量 右键菜单-机械动作设置 控件或显示器右键菜单-属性-机械动作 布尔常量(Boolean Constants) 1.4 字符型 字符串变量 字符串常量 1.5 复合型数据 波形数据 动态数据 示例:Two channel oscilloscope 1.6 路径 非法路径 空路径 绝对路径 相对路径 示例:Simple temperature datalogger 1.7 数据结构 数组 簇 示例 字符串-Decimal digit.vi 3 数组、簇和波形 一、数组 数组大小: 每维最多可有2^31-1个元素 数据类型: 所有元素的数据类型必须一致 ? 数组索引: 索引的范围是0到n – 1,其中n是数组中元素的个数 1.2 3.2 8.2 8.0 4.8 5.1 6.0 1.0 2.5 1.7 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 0 1 2 3 4 2D array index 10-element array 直接构建:一维、二维 用循环构建:一维、二维 4.构建数组 1. 从控制模板中选择数组框架 2. 放入相应的数据类型 3、变为多维:调整索引框或右键弹出菜单选项 Auto-Indexing – loops accumulate arrays at their boundaries 用循环建立和使用数组 For Loops auto index by default; While Loops do not Inner loop creates column elements Outer loop stacks them into rows 建立二维数组 数组大小Array size 建立数组函数b

文档评论(0)

1亿VIP精品文档

相关文档