首页
国内名著
国内文学
外国名著
影视作品
水浒传
道德经
易经
礼记
老子他说
学习字词典
我的日志
字号++
字号--
这里可以复制文本,然后在下面粘贴。
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApp1 { using System; using System.CodeDom; class Program { static void _Main() { double[,] array = { {1.0, 2.0, 3.0}, {4.0, 5.0, 6.0}, {7.0, 8.0, 9.0} }; // 斜线的交点在 array[1,1],其值为5.0 // 对 (1.5, 1.5) 附近的点进行线性插值 double x0 = 1.0, x1 = 2.0; double y0 = array[1, 1]; // 5.0 double y1 = array[2, 2]; // 9.0 double x = 1.5; double interpolatedValue = LinearInterpolation(x0, y0, x1, y1, x); Console.WriteLine($"线性插值后的值为: {interpolatedValue}"); } static double LinearInterpolation(double x0, double y0, double x1, double y1, double x) { return y0 + (y1 - y0) * (x - x0) / (x1 - x0); } static void Main(string[] args) { var datas = new int[,,] { { { 1, 2, 3 ,4}, { 5, 6, 7, 8 }, { 9,10, 11,12 } }, {{ 13,14,15,16 },{17,18,19,20 },{21,22,23,24 } } }; int x = datas.GetLength(2), y = datas.GetLength(1), z = datas.GetLength(0); var newdatas = new int[x, y, z]; for (int i = 0; i < x; i++) { for (int j = 0; j < y; j++) { for (int k = 0; k < z; k++) { newdatas[i, j, k] = datas[k, j, i]; } } } Console.WriteLine(datas.GetLongLength(2)); } } }
文本定期保存哦
居中
百度意思
百度图片
缓存数据
最近查询记录
我的笔记-2026-07-26_读书
2026-06-07读书
我的笔记-2026-06-07_读书
我的笔记-2026-05-22_读书
2026-05-22读书
反义词
近义词
词组
谜语
造句