I am trying to add a column , Position_Rating , to table T.
I would like the column to display a value of either 1, 2 or 3 depending on the If statement. I keep on getting an error "comparison between string and double is not supported".
Can anyone help me please? I have attached an image of the script.

댓글 수: 3

Geoff Hayes
Geoff Hayes 2020년 5월 19일
Callum - what can you tell us about the data in the table? Are the data types (for the variables) strings or numeric? The error message suggests that you are trying to compare a string with a number though it is unclear which comparison is failing... Please consider attaching your code and a small data sample (as a mat file).
Please show
head(T, 1)
Kavya Vuriti
Kavya Vuriti 2020년 7월 1일
Hi,
What are the data types of data in columns named as "Horizontal_Travel_m" and "Vertical_Travel_m"? And in which line are you facing error?

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

답변 (0개)

카테고리

도움말 센터File Exchange에서 Tables에 대해 자세히 알아보기

제품

릴리스

R2018b

질문:

2020년 5월 19일

댓글:

2020년 7월 1일

Community Treasure Hunt

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

Start Hunting!

Translated by