key_cam_03/MainWindow.xaml.cs
(开头部分) 4KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
//感谢http://blog.csdn.net/niewq/article/details/50210559
using System;
using System.Windows;
using System.Windows.Media;
using System.Windows.Threading;
using MathNet.Numerics.Data.Matlab;
using MathNet.Numerics.LinearAlgebra;
using Microsoft.Research.DynamicDataDisplay;
using Microsoft.Research.DynamicDataDisplay.DataSources;
namespace key_cam_03
{
/// <summary>
/// MainWindow.xaml 的交互逻辑
/// </summary>
public partial class MainWindow : Window
{
public ObservableDataSource<Point>[] dataSource = new ObservableDataSource<Point>[2] { new ObservableDataSource<Point>(), new ObservableDataSource<Point>() };
//private ObservableDataSource<Point> dataSource = new ObservableDataSource<Point>();
private DispatcherTimer timer = new DispatcherTimer();
private LineGraph graph = new LineGraph();
private int i = 0;
private double currentSecond = 0;
bool flag = false;
double[][] y;
double xaxis = 0;
double[] ymax = new double[8] { 0,0,0,0,0,0,0,0 };
double yaxis;
double group = 0.015;//默认组距
bool stop = false;
public MainWindow()
{
InitializeComponent();
Matrix<double> filt_data = MatlabReader.Read<double>("FrameworkData_01.mat", "filt_data");
y = filt_data.ToColumnArrays();
}
/*******
* private void AnimatedPlot(object sender, EventArgs e)
* 用于构造坐标点
*******/
private void AnimatedPlot(object sender, EventArgs e)
{
double x = currentSecond;
Point[] point = new Point[2];
point[0] = new Point(x, y[0][i]);
point[1] = new Point(x, y[1][i]);
dataSource[0].AppendAsync(base.Dispatcher, point[0]);
dataSource[1].AppendAsync(base.Dispatcher, point[1]);
i++;
if (currentSecond - group > 0)
{
xaxis = currentSecond - group;
}
后面还有 71 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。