MATLAB Answers

0

Why do I keep getting this error?

Lala0099 님이 질문을 제출함. 12 Mar 2019
최근 활동 Adam Danz 님이 편집함. 25 Mar 2019
The error message is :
Error using line
Vectors must be the same length.
Error in filter_and_star_and_final (line 37)
line([t(t_startx), t(t_startx)], ylim, 'Color', 'r', 'LineWidth', 2); % Put a red line there.
I have attache my code and the file that I am trying to use.
I would appreciate any help

  댓글 수: 0

로그인 to comment.

답변 수: 1

Adam Danz 님의 답변 12 Mar 2019

My guess is that ylim produces a [1 by 2] vector but [t(t_startx), t(t_startx)] does not produce a [1 by 2] vector.
If that's the case,
timePoint2 = FindTimePoint2(x); % I bet timePoint2 has more than 1 value!
t_startx= timePoint2;

  댓글 수: 13

표시 이전 댓글 수: 10
Well I think the problem was that somehow the dimensions did not match the requirements, and the find() command returned a 0x1 ouput.
So i just added a +1 to the code, so the cell would not be empty. and I think it might have solved the problem. But i dont know really.
I dont know why it returns the 0x1 . ~
Be careful. Just because the error message no longer shows doesn't meet the change you meet corrected the real problem.
okay, thank you .
I dont know how to fix the real problem.

로그인 to comment.



Translated by