Info
이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.
How to find Y value that corresponds to the maximum X value in these graphs?
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi,
I need to find the Y value that corresponds to the maximum X value for the curves attached herewith.
I tried to use interp1, but I am not sure how to make it for several files.
Can anyone please help me with this?
Thank you.
답변 (1개)
KSSV
2019년 2월 19일
files = dir('*.txt') ;
N = length(files) ;
iwant = zeros(N,2) ;
for i = 1:N
data = load(files(i).name) ;
[val,idx] = max(data(:,1)) ;
iwant(i,:) = [val data(idx,2)] ;
end
댓글 수: 8
KSSV
2019년 2월 19일
Okay.....try this https://in.mathworks.com/matlabcentral/fileexchange/10959-sort_nat-natural-order-sort to read the file sin order.
이 질문은 마감되었습니다.
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!