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

📄 lookuptable1d.c

📁 利用Stateflow 进行嵌入式代码开发很好用
💻 C
字号:
/* This file is an example legacy lookup table source file */
/* The object of this example is to interface to the the lookup functions below */

#include "your_types.h"
#include "lookupTable.h"

/* 1D Lookup Tables */
/* The table algorithms implement a kinda close lookup method for simplicity sake */

FLT lookupTable1D(const FLT *InputMap, const FLT *OutputMap, const UINT MapLength, FLT InputValue)
{
  int idx = 0;
  FLT result;

  /* Search for the Element in the InputMap Above the Input Value*/
  while ( (idx < (MapLength-1)) && (InputMap[idx] < InputValue) )
    idx++;
  
  result = OutputMap[idx];
  return result;
}

⌨️ 快捷键说明

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