Linear Interpolation in Matlab

4 ビュー (過去 30 日間)
Angel Carrillo
Angel Carrillo 2015 年 5 月 4 日
コメント済み: John D'Errico 2015 年 5 月 5 日
I have an excel file spreadsheet with four columns containing the velocity pressure exposure coefficients, Kz, for different values of height above ground level,z. The first column A is height above ground, the other three columns (B, C, D) are the values of Kz.
Create a MATLAB script that will estimate the value of Kz given a particular exposure type and for any value of z up to 500 ft. Your MATLAB script must do the following tasks:
  1. Import the data file into MATLAB
  2. Prompt the user to specify exposure type
  3. Prompt the user to specify height above ground level
  4. Identify the correct lower and upper bounds given the height specified in step #3 and the exposure type specified in step #2
  5. Perform the linear interpolation to estimate Kz for the specified height from step #3
I can't hard code it or use the built in linear interpolation function so I keep on getting various errors. I need help with indexing the arrays and putting them into the linear int. equation.
  1 件のコメント
John D'Errico
John D'Errico 2015 年 5 月 5 日
Break a problem that is too large for you into SMALL problems that you CAN focus on and solve. Solve each one, then put them all together. This is how all large problems are solved.

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

回答 (1 件)

Image Analyst
Image Analyst 2015 年 5 月 4 日
One question I have is if you're supposed to average columns B, C, and D together to get a single value of Kz for that particular height in column A.
Other hints: xlsread(), inputdlg(), min() and max(), and interp1().

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by