可能不是你想要的简单答案,但这里有一个小C#方法,可以自己解开相位;
以防万一你倾向于自己动手:-) / * * public static double [] PhaseUnwrap(double [] data)* * Version 1.0 - Nov 2008 * *描述:* unwrap阶段* *要求:*
数据以度为单位*所有数据元素都在+180.0和-180.0之间(包括)* mag(相位斜率)小于180(非包裹点之间的差异)* * / public static double [] PhaseUnwrap(double []
数据){double [] newdata;
double offset = 0.0;
newdata = new double [data.Length];
newdata [0] = data [0];
for(int i = 1; i 180.0){offset + = 360.0;
} else if((data [i - 1] - data
){offset - = 360.0;} newdata = data + offset;} return newdata;}抱歉搞乱的代码语法 -
愚蠢的论坛引擎认为“[['”]]之间的所有内容都是URL。旧的论坛软件有一个特殊的标签用于放置代码片段而不试图将它们重新解释为HTML
以上来自于谷歌翻译
以下为原文
Probably not the simple answer you were looking for, but here is a small C# method for unwrapping the phase yourself; just in case you are inclined to take matters into your own hands :-)
/*
* public static double[] PhaseUnwrap(double[] data)
*
* Version 1.0 - Nov 2008
*
* Description:
* unwrap phase
*
* Requirements:
* data is in degrees
* all elements of data are between +180.0 and -180.0 (inclusive)
* mag(phase slope) is less than 180 (difference between non-wrapped points)
*
*/
public static double[] PhaseUnwrap(double[] data)
{
double[] newdata;
double offset = 0.0;
newdata = new double[ data.Length ];
newdata[0] = data[0];
for (int i = 1; i 180.0)
{
offset += 360.0;
}
else if ((data[i - 1] - data) < -180.0)
{
offset -= 360.0;
}
newdata = data + offset;
}
return newdata;
}
Sorry about the messed up code syntax - the stupid forum engine thinks everything in between "[[' "]]" is URL. The old forum software had a special tag for placing code snippets without trying to reinterpret them as HTML
可能不是你想要的简单答案,但这里有一个小C#方法,可以自己解开相位;
以防万一你倾向于自己动手:-) / * * public static double [] PhaseUnwrap(double [] data)* * Version 1.0 - Nov 2008 * *描述:* unwrap阶段* *要求:*
数据以度为单位*所有数据元素都在+180.0和-180.0之间(包括)* mag(相位斜率)小于180(非包裹点之间的差异)* * / public static double [] PhaseUnwrap(double []
数据){double [] newdata;
double offset = 0.0;
newdata = new double [data.Length];
newdata [0] = data [0];
for(int i = 1; i 180.0){offset + = 360.0;
} else if((data [i - 1] - data
){offset - = 360.0;} newdata = data + offset;} return newdata;}抱歉搞乱的代码语法 -
愚蠢的论坛引擎认为“[['”]]之间的所有内容都是URL。旧的论坛软件有一个特殊的标签用于放置代码片段而不试图将它们重新解释为HTML
以上来自于谷歌翻译
以下为原文
Probably not the simple answer you were looking for, but here is a small C# method for unwrapping the phase yourself; just in case you are inclined to take matters into your own hands :-)
/*
* public static double[] PhaseUnwrap(double[] data)
*
* Version 1.0 - Nov 2008
*
* Description:
* unwrap phase
*
* Requirements:
* data is in degrees
* all elements of data are between +180.0 and -180.0 (inclusive)
* mag(phase slope) is less than 180 (difference between non-wrapped points)
*
*/
public static double[] PhaseUnwrap(double[] data)
{
double[] newdata;
double offset = 0.0;
newdata = new double[ data.Length ];
newdata[0] = data[0];
for (int i = 1; i 180.0)
{
offset += 360.0;
}
else if ((data[i - 1] - data) < -180.0)
{
offset -= 360.0;
}
newdata = data + offset;
}
return newdata;
}
Sorry about the messed up code syntax - the stupid forum engine thinks everything in between "[[' "]]" is URL. The old forum software had a special tag for placing code snippets without trying to reinterpret them as HTML
举报