Match function in matlab
27 ビュー (過去 30 日間)
古いコメントを表示
Mateusz Brzezinski
2020 年 2 月 20 日
回答済み: Melissa Rosa
2023 年 3 月 1 日
Hello,
I am looking for a function that corresponds to the excel "match" function.
I have an array of (n,32) where n is sated in for loop function as a number of completed loops (so it differs).
DataOutput = zeros(length(phiAStart:phiAStep:phiAEnd),32);
I would like to find the smallest value in column 32 (y) and get the corresponding value in column 1 (x) where y=f(x).
DataOutput(colector,1) = x;
DataOutput(colector,32) = y;
I can not resolve a function (to get x) having y because it's numerically calculated polynomial so I thought about something similar that MATCH function from excel.
Is there any similar function in Matlab or simple script that can be introduced?
I will be thankful for any suggestions or codes that may work.
0 件のコメント
採用された回答
Mateusz Brzezinski
2020 年 2 月 20 日
編集済み: Mateusz Brzezinski
2020 年 2 月 20 日
2 件のコメント
Steven Lord
2020 年 2 月 20 日
That will give you all the matching x values. Do you want that or do you want the first such match?
その他の回答 (2 件)
Steven Lord
2020 年 2 月 20 日
Call the min function with two outputs. Use the second output to retrieve the corresponding value.
参考
カテゴリ
Help Center および File Exchange で JSON Format についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!