资源简介
Unwrap by changing deltas between values to 2*pi complement. Unwrap radian phase phase by changing absolute jumps greater than discont to their 2*pi complement along the given axis.
代码片段和文件信息
//
// unwrap.cpp
//
// Copyright © 2017 Z. Nan. All rights reserved.
//
# include
# include
# include
# define PI 3.14159265358979323846
using namespace std;
double mod(double a double b) {
/*
Return remainder of division.
:param a: dividend
:param b: divisor
:return remains: remainder of the quotient floor_divide(a b)
*/
int quotients;
double remains;
if (a >= 0 && b > 0) {
if (a < b) {
remains = a;
}
else if (a == b) {
remains = 0;
}
else {
quotients = (int) (a/b);
remains = a - b * quotients;
}
}
else if (a <= 0 && b < 0) {
remains = mod(-a -b);
remains = -remains;
}
else if (a <= 0 && b > 0) {
remains = mod(-a b);
remains = b - remains;
}
else if (a >= 0 && b < 0) {
remains = mod(-a -b);
remains = -remains;
}
else {
cout << “Input Error!“ << endl;
exit(0);
}
return remains;
}
void unwrap(vector & phase vector & unwrapped_phase) {
/*
Unwrap by changing deltas between values to 2 * pi complement.
Unwrap radian phase phase by changing absolute jumps greater than discont to their 2 * pi complement along the given axis.
:param phase: input array
:return unwrap
- 上一篇:二维绘图系统
- 下一篇:Effective C++中文版 超清pdf
相关资源
- Effective C++中文版 超清pdf
- Floyd算法C++
- C++进程优先级调度进程优先级调度进
- BP神经网络VC++实现
- 基于C++的图书馆管理系统
- c++五子棋人机对战源程序
- vc知识库大讲堂c++教程.txt
- C++实现通用链表
- c++成语接龙代码.rar
- 银行储蓄系统c++
- OpenCV+C++图像处理项目14个
- 山大C++实验
- 四变量遗传算法求最小值程序C++
- 用VS2015+opencv3.4.2+C++编写Yolov3目标检测
- funcode太空战机c++
- ntripclient-c++
- c++ 课程设计报告 可直接交作业版
- C++算法编程视频
- 格雷码等结构光条纹的生成C++
- SLIC算法做superpixel实现C++
- c++程序设计》第二版高等教育出版社
- 光线追踪算法C++实现
- C++课程设计报告-科学计算器加强版
- 拓扑排序C++代码
- zxing库c++)
- 基于C++实现DFT和IDFT——数字信号处理
- c++程序图的遍历深度优先,广度优先
- 时空上下文视觉跟踪STC含有matlab和c
- 华为C++笔试题全部汇总
- 小型公司工资管理系统课程设计报告
评论
共有 条评论