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

📄 matvar.c

📁 阵列信号处理的工具箱
💻 C
字号:
/******************************************************************************% RECVAR, A package for new data types in Matlab 4. % RECVAR was written by Svante Bj鰎klund.% (c) FOA 1997. See the file rvright.m for copyright notice.    Compile with:      cmex matvar.c      Start        : 95/12/11 Svante Bj鰎klund(svabj).    Latest change: $Date: 1997/08/01 18:13:08 $ $Author: svabj $. ******************************************************************************/#define V4_COMPAT	// Matlab kompatible with version 4.#include <string.h>	/* strcmp(), strncpy(), memcpy() */#include <stdlib.h>	/* calloc(), free() */#include <limits.h>	/* INT_MAX, SHRT_MAX */#include "mex.h"	/* Functions to use in mex-programs. */#include "mat.h"	/* Functions to handle Matlab matrices, 			   including mxSetDispMode() */static const char *rcsid = "$Id: matvar.c,v 2.12 1997/08/01 18:13:08 svabj Exp $";/* #define DYNAMIC_RECORDS */	/* If storing pointers to the fields in the 				   Matlab matrix */enum Boolown { FALSK, SANN };	/* V錼 bool-datatyp */typedef enum Boolown 	BoolT;#if defined(unix) || defined(__WIN32__) typedef int		Int32T; typedef short		Int16T; #define INT16T_MAX	SHRT_MAX typedef unsigned int	UInt32T; #define UINT32T_MAX	UINT_MAX typedef unsigned short	UInt16T; typedef unsigned char	UInt8T; typedef float		Float32T; typedef double		Float64T; #define StringT	string #define FPT #elif defined(__WATCOMC__) typedef long		Int32T; typedef short		Int16T; #define INT16T_MAX	SHRT_MAX typedef unsigned long	UInt32T; #define UINT32T_MAX	ULONG_MAX typedef unsigned short	UInt16T; typedef unsigned char	UInt8T; typedef float		Float32T; typedef double		Float64T; #define StringT	string #define FPT _far#else typedef long		Int32T; typedef short		Int16T; #define INT16T_MAX	SHRT_MAX typedef unsigned long	UInt32T; #define UINT32T_MAX	ULONG_MAX typedef unsigned short	UInt16T; typedef unsigned char	UInt8T; typedef float		Float32T; typedef double		Float64T; #define StringT	string #define FPT _far#endiftypedef unsigned long int ULIntT;#if defined(unix) || defined(__WIN32__)  typedef double FloatMatlabT;#else  typedef double FloatMatlabT;#endiftypedef FloatMatlabT* 	FloatMatlabPT;void assertFunktion(int test, int rad, char* fil, const char* msg){  if (!test)  {    mexPrintf("Assert error on line %d in file %s : %s\n", rad, fil, msg);  }}#define ASSERT_ON#ifdef ASSERT_ON  #define assert(test, msg) assertFunktion(test, __LINE__, __FILE__, msg)#else  #define assert(test, msg) 	#endifconst char* accessFieldErrMsg = "Trying to access invalid FieldHeadT.";const char* accessNullErrMsg = "Trying to access with NULL pointer.";#define TEXT    1                       /* mat.type indicating text */#define MATRIX  0                       /* mat.type indicating matrix */typedef Matrix* 	MatrixPT;typedef MatrixPT*	MatrixPPT;const   sizeOfFM = sizeof(FloatMatlabT);typedef UInt32T  SizeFMT;		/* For sizes in multiples of					   sizeof(FloatMatlabT) *//*****************************************************************************// Declarations for storing Matlab matrices in the pr-block of a Matlab Matrix.  *****************************************************************************//*=========================================================================//=========================================================================*/#define RECVARVERSION 3		     /* Om struct RecordHeadT eller 					struct FieldHeadT 鋘dras ska denna					siffra 鰇as. Sedan m錽te man testa p

⌨️ 快捷键说明

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