フィルターのクリア

deriving surface equation form data on a table

2 ビュー (過去 30 日間)
milad babaei
milad babaei 2011 年 6 月 30 日
i have a table with 3 variables(B/H)= 1,2,3,4,5,6,7,8 and fi= 0,10,20,30 and h which is depend on (B/H) and fi that contains 32 values. for example for fi=0 and (B/H)=1 >>h=1 fi=0 and (B/H)=2 >>h=1.02 ...... fi=30 and (B/H)=8 >>h=14800
>is there any way in MATLAB to get an surface equation for h in terms of (B/H) and fi??
h:[ 1 1.02 1.11 1.21 1.3 1.4 1.59 1.78
1 1.11 1.35 1.62 1.95 2.33 3.34 4.77
1.01 1.39 2.12 3.29 5.17 8.29 22 61
1.13 2.5 6.36 17.5 50 150 1400 14800 ]
  4 件のコメント
Sean de Wolski
Sean de Wolski 2011 年 6 月 30 日
There can be at least one polynomial of order>(number elements) that fits perfectly. Thus from n-> infinity: To infinity and beyond!
milad babaei
milad babaei 2011 年 7 月 1 日
would u introduce me that polynomial which fits perfectly??

サインインしてコメントする。

回答 (1 件)

Andrei Bobrov
Andrei Bobrov 2011 年 6 月 30 日
BHv= [1,2,3,4,5,6,7,8];
fiv= [0,10,20,30];
h = rand(length(BHv),length(fiv))*30+10;
[fim BHm] = meshgrid(fiv,BHv);
[XI,YI] = meshgrid(linspace(fiv(1),fiv(end),100),linspace(BHv(1),BHv(end),100));
1 variant use 'interp2'
F1 = @(fi,BH)interp2(fim,BHm,h,fi,BH);
surf(F1(XI,YI))
2 variant use 'TriScatteredInterp'
F = TriScatteredInterp(fim(:),BHm(:),h(:));
figure,surf(F(XI,YI))
  2 件のコメント
milad babaei
milad babaei 2011 年 6 月 30 日
tnx for your help.what about other h values?
would you please explain how should write this code??
milad babaei
milad babaei 2011 年 7 月 2 日
i mean i have a table which 32 values for h are specific based on fi and (B/H).so i m thinking that for fitting an surface by equation we should consider those values.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSurface and Mesh Plots についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by