我需要在 C# 中针对 t1 绘制 y1;这些是我的阵列。你能告诉我我该怎么做吗?我对 C# 很陌生,我不太了解它。谢谢这里是我的代码:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.Research.Oslo;
namespace odestiff
{
class Program
{
static void Main(string[] args)
{
//solve the equations with Gear method
var sol = Microsoft.Research.Oslo.Ode.GearBDF(
0,
new Vector(2, 0),
(t, x) => new Vector(
x[1],
1000 * (1 - x[0]*x[0]) * x[1] - x[0])).TakeWhile(p => p.T <= 3000).ToArray(); //define the time span
//// put results in an array
double[] y1 = sol.Select(p => p.X[0]).ToArray();
double[] t1 = sol.Select(p => p.T).ToArray();
}
}
}