Zero Upcrossings, Period and Wave height

조회 수: 3 (최근 30일)
João
João 2014년 10월 17일
Hello guys,
I'm not very good with matlab and despite understanding what i have to do "on paper" I need help with the code. I have a huge amount of points (x=time and y=position) describing a non regular wave. I have this to get the data from the Txt.
filename = '/Users/helenapereira/Desktop/A1-Wave Data.txt';
delimiter = '\t';
startRow = 3;
formatSpec = '%f%f%[^\n\r]';
fileID = fopen(filename,'r');
dataArray = textscan(fileID, formatSpec, 'Delimiter', delimiter, 'HeaderLines' ,startRow-1, 'ReturnOnError', false);
fclose(fileID);
Time = dataArray{:, 1};
WAVE = dataArray{:, 2};
clearvars filename delimiter startRow formatSpec fileID dataArray ans;
How can I get the zero upcrossings? (where it goes from negative to positive). Also I believe that I have to interpolate between two values to find the exact x value of y=0.
From the zero upcrossings how can I get the Periods? And the wave height for each period?
Thanks for the help :)

답변 (0개)

카테고리

Help CenterFile Exchange에서 Get Started with MATLAB에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by