change table var type
이전 댓글 표시
How can I change the variable type in a table from double to string ?
I found plenty of posts with the same issue but during import from excel. My table is already there and I need to change the var type of a column.
채택된 답변
추가 답변 (1개)
KALYAN ACHARJYA
2021년 2월 8일
편집: KALYAN ACHARJYA
2021년 2월 8일
"My table is already there and I need to change the var type of a column."
If the data is numeric, you can use num2str(variable_name) to convert numeric var to string data type.
Lets suppose you have table variable T and want to convert string of the particular column variable "col1", then
num2str(T.col1)
댓글 수: 2
Jeremy Hughes
2021년 2월 8일
I think you should share your code. Hard to tell what you really need to do.
카테고리
도움말 센터 및 File Exchange에서 Tables에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!