How do to fix this invalid data type error?

조회 수: 8 (최근 30일)
Christopher Resuello
Christopher Resuello 2024년 4월 17일
댓글: Taylor 2024년 4월 17일
Hi,
I have an issue with this data type error and not quite sure what the problem is. The reset of the code is designed for a filter, and had it exported.
Invalid data type. First and second arguments must be numeric or logical.
Error in conv (line 43)
c = conv2(a(:),b(:),shape);
Error in FDM_17ES04 (line 88)
DSBSC_BPF1=conv(BPF1,Xfdm);

채택된 답변

Taylor
Taylor 2024년 4월 17일
Either a, b, BPF1, or Xfdm is not a numeric or logical data type. You can verify this by using isnumeric and islogical.
  댓글 수: 3
Christopher Resuello
Christopher Resuello 2024년 4월 17일
I found the issue, the filter is assigned as an object rather than array. Thanks for the tip
Taylor
Taylor 2024년 4월 17일
Yes. conv requires the first two inputs to be either numeric or logical types.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Floating-Point to Fixed-Point Conversion에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by