Implementation of Data and Sinus Curves maximum

Dear community,
i am still pretty new to matlab and have a problem.
I would like to write an evaluation script for measurements. I have a dataset with 6 columns and depending on the measurement different target rows.
Column 1,3,5 are always the time and therefore it is enough to transfer column 1. Column 2,4,6 are Y1,Y2,Y3.
I would like to plot Y2 over Y1 after the readout and then get the high point of the sinus curves of the Y2 output. For this I need the corresponding time and Y3 value.
As you can see I need quite a lot...
But at the moment I still have problems to insert the data correctly...
%% Read in the data
fileName = 'Test_Excel.txt';
fid= fopen (fileName, 'r')
content = textscan(fid, '%s%s%d%s%d%s','delimiter',',');
%content = textscan(fid,'%s','delimiter',';'); (this one seems to work better but ..not really)
fclose(fid);
content=[content{:}];
After inserting the Data i thought i should split the data
I would have done it that way
%%Aufteilen der Daten
i=5; j=1;
while i <= length(content)
Zeit(j)= content(i);
i=i+6;
j=j+0;
end
i am a bit desperate and need tips and help. Thanks in advance.
Lina

Answers (1)

It sounds like the islocalmax function may be of use to you.

Asked:

on 23 Apr 2021

Answered:

on 23 Apr 2021

Community Treasure Hunt

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

Start Hunting!