Locating "Z" value with respect to "X" &"Y" values in a excel table.

15 ビュー (過去 30 日間)
am
am 2013 年 7 月 13 日
コメント済み: am 2013 年 10 月 6 日
Hello, In a project I have this excel table, in which I have the first row as X values and first column as Y values. Now all the other values in relation with corresponding X and Y values are present. All I need is to 1) Search the table if my Calculated X and Y values lie in table. 2) If present then find corresponding "Z" value. 3) To do interpolation if necessary
If anyone could help, I would be very thankful. Tks
<<C---Users--YASIR--Desktop--Untitled.png>>

採用された回答

Matt J
Matt J 2013 年 7 月 13 日
編集済み: Matt J 2013 年 7 月 13 日
You may as well skip (1) and (2). Interpolation will trivially return the given Z(i,j) values if you query at one of the given (X(i),Y(j))
Read your data into a 2D Z matrix using xlsread. Similarly, read in your X and Y as vectors. Then do
F=griddedInterpolant(X,Y,Z);
Now query at points Xq, Yq as follows
out=F(Xq,Yq);

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTables についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by