필터 지우기
필터 지우기

Having an error : matrix dimension must agree

조회 수: 1 (최근 30일)
Kasih Ditaningtyas Sari Pratiwi
Kasih Ditaningtyas Sari Pratiwi 2017년 11월 6일
Hi! I need your help. I have a problem with the code below. It says an error: "matrix dimension must agree'. Do you know how to solv this problem? Thank you very much for your help.
% convert the datetime to double
time_start=datenum(peakflowanalysis2.Start);
time_end=datenum(peakflowanalysis2.End);
time_array=datenum(flowtable.DateAndTime);
flow=flowtable.Durchflusslm;
ind1=find(time_array==time_start);
ind2=find(time_array==time_end);
peak_sum=trapz(flow(peakflowanalysis2.Start(ind1):peakflowanalysis2.End(ind2)));% trapz method
I got an error in find function. Is that because I use double format for time_start, time_end and time_array? Thank you so much for your help.
  댓글 수: 2
Birdman
Birdman 2017년 11월 6일
What are the sizes of time_start, time_end and time_array?
Kasih Ditaningtyas Sari Pratiwi
Kasih Ditaningtyas Sari Pratiwi 2017년 11월 6일
time_start is 11x1 double, time_end 11x1 double, and time_array 5527x1 double. I want to know the index of the time so that I can use it for trapz function

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Numerical Integration and Differentiation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by