Hi. I can't plot the x axis data in findpeaks plot?
Show older comments
Thereby I cant find the locs of the peaks for which I cant find out the peakwidth. I need to find out the alternative peak distance e.g stick slip from the graph. I am attaching the data file and command file that I was using.
data=xlsread('r 1 1.xlsx');
x = data(:,1);
dx = x(2) - x(1);
y = data(:,2);
plot(x,y,'marker','d','MarkerSize',2);title('Pull-out Resistance vs Displacement','fontsize',20)
xlabel('Displacement, mm','fontsize',16)
ylabel('Force, N','fontsize',16)
pks=findpeaks(x,y)
%[pks,loca]=findpeaks(x,y)
Answers (1)
Adam
on 13 Jul 2017
pks=findpeaks(x,y)
is not a supported syntax (assuming the variables are named sensibly)
[___] = findpeaks(data,x)
is the syntax you would seem to want, as described in
doc findpeaks
I don't really understand your question though apart from that.
Categories
Find more on Annotations in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!