how to use find function to read data from excel sheet??

조회 수: 1 (최근 30일)
Rohit Bhoi
Rohit Bhoi 2016년 2월 18일
댓글: Star Strider 2016년 2월 18일
I havee excel sheet first row is temperature while second row is elongation if user give any value of temperature then I have to find respective elongation value. then how to find that value in first row and pick up value in next cell. for e.g if user giving value 30 which is present in A8 cell then I want the value from B8.

채택된 답변

Star Strider
Star Strider 2016년 2월 18일
First, use the xlsread function to read the file into your workspace.
Unless you absolutely must use the find function, and if your ‘temperature’ data are monotonically increasing, I would use the interp1 function instead. It’s easier, and will give more accurate results if a temperature is not exactly one in your table.
  댓글 수: 2
Rohit Bhoi
Rohit Bhoi 2016년 2월 18일
But how to acess next cell
Star Strider
Star Strider 2016년 2월 18일
Read everything into your MATLAB workspace with xlsread. It should appear as a (Nx2) matrix (as you’ve described it), so using either find, or preferably interp1, with it would be straightforward after that.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by