资源简介
C# 离散余弦变换DCT, 经检验与Matlab计算结果相同

代码片段和文件信息
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace DCT_Test
{
class Complex
{
private double m_dRealPart;
private double m_dImagePart;
public double Real
{
set{ m_dRealPart = value;}
get{ return m_dRealPart; }
}
public double Image
{
set { m_dImagePart = value; }
get { return m_dImagePart; }
}
public Complex(double dRealPart double dImagePart)
{
m_dRealPart = dRealPart;
m_dImagePart = dImagePart;
}
public Complex(double dRealPart)
{
m_dRealPart = dRealPart;
m_dImagePart = 0;
}
public Complex()
{
m_dRealPart = 0;
m_dImagePart = 0;
}
public Complex(Complex orig)
{
m_dRealPart = orig.m_dRealPart;
m_dImagePart = orig.m_dImagePart;
}
static public Complex operator +(Complex op1 Complex op2)
{
Complex res = new Complex();
res.m_dRealPart = op1.m_dRealPart + op2.m_dRealPart;
res.m_dImagePart = op1.m_dImagePart + op2.m_dImagePart;
return res;
}
static public Complex operator -(Complex op)
{
Complex res = new Complex();
res.m_dRealPart = -op.m_dRealPart;
res.m_dImagePart = -op.m_dImagePart;
return res;
}
static public Complex operator -(Complex op1 Complex op2)
{
Complex res = new Complex();
res = op1 + (-op2);
return res;
}
static public Complex operator *(Complex op1 Complex op2)
{
Complex res = new Complex();
res.m_dRealPart = op1.m_dRealPart * op2.m_dRealPart - op1.m_dImagePart * op2.m_dImagePart;
res.m_dImagePart = op1.m_dImagePart * op2.m_dRealPart + op1.m_dRealPart * op2.m_dImagePart;
return res;
}
static public Complex operator /(Complex op1 Complex op2)
{
Complex res = new Complex();
double temp = op2.m_dRealPart * op2.m_dRealPart + op2.m_dRealPart * op2.m_dImagePart;
res.m_dRealPart = (op1.m_dRealPart * op2.m_dRealPart + op1.m_dImagePart * op2.m_dImagePart) / temp;
res.m_dImagePart = (op1.m_dImagePart * op2.m_dRealPart - op1.m_dRealPart * op2.m_dImagePart) / temp;
return res;
}
public double NormSquare()
{
return m_dRealPart * m_dRealPart + m_dImagePart * m_dImagePart;
}
public static Complex [] exp(Complex [] data)
{
// For complex Z=X+i*Y EXP(Z) = EXP(X)*(COS(Y)+i*SIN(Y))=EXP(X)*COS(Y)+EXP(X)*i*SIN(Y) .
int Len = data.Length;
Complex[] ex
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 4249 2013-08-18 00:24 Complex.cs
文件 825 2013-08-18 00:12 ComplexExp.cs
文件 1882 2013-08-18 12:46 DCTransform.cs
文件 8041 2013-08-18 12:46 FFTransform.cs
文件 595 2013-08-17 22:41 ReorderSort.cs
----------- --------- ---------- ----- ----
15592 5
相关资源
- C# TIP文件生成和拆解
- C#解析HL7消息的库135797
- C# OCR数字识别实例,采用TessnetOcr,对
- 考试管理系统 - C#源码
- asp.net C#购物车源代码
- C#实时网络流量监听源码
- C#百度地图源码
- Visual C#.2010从入门到精通配套源程序
- C# 软件版本更新
- C#屏幕软键盘源码,可以自己定制界面
- 智慧城市 智能家居 C# 源代码
- c#获取mobile手机的IMEI和IMSI
- C#实现简单QQ聊天程序
- 操作系统 模拟的 欢迎下载 C#版
- C#写的计算机性能监控程序
- 用C#实现邮件发送,有点类似于outlo
- MVC model层代码生成器 C#
- c#小型图书销售系统
- C# Socket Server Client 通讯应用 完整的服
- c# winform 自动登录 百度账户 源代码
- C#编写的16进制计算器
- C#TCP通信协议
- C# 数据表(Dataset)操作 合并 查询一
- C#语音识别系统speechsdk51,SpeechSDK51L
- 数据库备份还原工具1.0 C# 源码
-
[免费]xm
lDocument 节点遍历C# - EQ2008LEDc#开发实例
- DirectX.Capturec# winform 操作摄像头录像附
- c# 实现的最大最小距离方法对鸢尾花
- C#版保龄球记分代码
评论
共有 条评论