Convert table and obtain column values
古いコメントを表示
Hello, I have this table

How can I first generate an array of string and numbers and then replace the '---' with NaN. Finally I would need to get the values of the Var4 and Var 7.
採用された回答
その他の回答 (1 件)
Steven Lord
2019 年 9 月 18 日
0 投票
Use ismissing to locate the missing values (you can tell ismissing what it should consider as a missing value) then use the logical array output to replace the missing values with whatever value you want.
The fact that you're changing the data type (potentially for some but not all of the values of a table variable) could complicate things a bit, but if that's the case show a larger sample of your table (maybe two or three rows that have a missing value and two or three that don't) and we may be able to help you determine how to handle that situation.
カテゴリ
ヘルプ センター および File Exchange で Cell Arrays についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!