excel x & y

1 回表示 (過去 30 日間)
Alireza Lashgary
Alireza Lashgary 2016 年 8 月 4 日
コメント済み: Alireza Lashgary 2016 年 8 月 4 日
Hi there i read two columns from an excel file. first column is x and second is y. i get x from user , how can a i find y for that x?
for example user inputs 0.531 i must show 0.5103 or user inputs 0.536 i must show 0.5154
my matrix is 2x1000 ( 2 columns and 1000 rows) please help

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2016 年 8 月 4 日
編集済み: Azzi Abdelmalek 2016 年 8 月 4 日
If M is your matrix
M=[0.5310 0.5103;0.5320 .5080;0.5330 0.5144]
x=0.5310
idx=ismember(M(:,1),x)
y=M(idx,2)
  1 件のコメント
Alireza Lashgary
Alireza Lashgary 2016 年 8 月 4 日
thanks

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

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by