已知数据用matlab拟合三维图

2024-12-15 19:38:01
推荐回答(1个)
回答1:

data=[13.39397 10779.24086 26376.57565
13.18762 10624.98982 28662.55399
12.12091 9529.590057 28863.00213
12.29292 9550.568789 29101.70489
12.77686 9570.945701 30343.15172
12.96479 9503.750018 30721.88902
24.56432 16004.43478 34224.24505
23.86597 16041.78065 34676.95219
22.79274 16801.20476 35004.60145
17.15393 10327.30357 38834.72723
17.19834 10363.02472 39477.20382
23.30241 17202.82461 39725.03034
19.90063 10691.38352 39808.59269];
T=data(:,1);
D=data(:,2);
K=data(:,3);
[X,Y,Z]=griddata(T,D,K,linspace(min(T),max(T))',linspace(min(D),max(D)),'v4');%插值
figure,surf(X,Y,Z)%三维曲面