フィルターのクリア

How to convert categorical data to double with unique rows

3 ビュー (過去 30 日間)
Deborah Johnson
Deborah Johnson 2023 年 1 月 19 日
コメント済み: Deborah Johnson 2023 年 1 月 19 日
Hello, please assist me with converting categorical data to double data. Would a if statement do this?
Under Vertical Steering Column, replace unique categoriacal text to a unique double value.
rows with Altitude to '0'
rows with Limbo to '6'

採用された回答

David Hill
David Hill 2023 年 1 月 19 日
編集済み: David Hill 2023 年 1 月 19 日
a=readtable('Book1.xlsx');
b=zeros(size(a));
b(ismember(a.Vertical_Steering,'Limbo'))=6
b = 1045×1
0 0 0 0 0 0 0 0 0 0
  1 件のコメント
Deborah Johnson
Deborah Johnson 2023 年 1 月 19 日
I did it in Excel but wanted to learn an easy way in MATLAB. Thanks!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSpreadsheets についてさらに検索

製品


リリース

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by