Operator '-' is not supported for operands of type 'cell'.

조회 수: 24 (최근 30일)
Alexandra Philip
Alexandra Philip 2020년 7월 1일
편집: Alexandra Philip 2020년 7월 6일
I am having some problem with obtaining a calculation as it is followed by this error:
Operator '-' is not supported for operands of type 'cell'.
Error in Tumbledata_user (line 28)
VSFR=cos(radians)*((ATtable{1,3} - (ATtable{1,5}))/(2*Rs)) %Vertical readings-scale factor
Then try to perform the calculation: VSFR=cos(radians)*((ATtable{1,3} - (ATtable{1,5}))/(2*Rs)). I am subtracting certain values from the table.
I am wondering why I am receiving the error: Operator '-' is not supported for operands of type 'cell'. And how to resolve this issue.

채택된 답변

Matt J
Matt J 2020년 7월 1일
Check the contents of ATtable{1,3} and ATtable{1,5}. I bet they're not numbers.
  댓글 수: 4
Walter Roberson
Walter Roberson 2020년 7월 2일
If you are using a current release of MATLAB, you can do a detectImportOptions and then set the VariableOptions properties Prefixes and Suffixes to include the apostrophe, I think.
Star Strider
Star Strider 2020년 7월 2일
See: Position and extraction of row. We may have serendipitously solved this with str2double.

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Tables에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by