I need to extract the force corresponding to the maximum strain for every cycle count from the attached file.
data=xlsread('Sample Data.xlsx');count=data(:,1);strain=data(:,2);force=data(:,3);unique_counts=unique(count);maxforce=zeros(size(unique_counts));maxstrain=zeros(size(unique_counts)); for n=1:numel(unique_counts) c=unique_counts(n); rows=ismember(count,c); strain_=strain(rows); force_=force(rows); maxstrain(n)=max(strain_); %% Here is where I need input maxforce(n)= ?end
Thank you
Best Answer