How do I convert one row of values using a unit conversion?

1 回表示 (過去 30 日間)
Annika Colmer
Annika Colmer 2022 年 2 月 11 日
回答済み: Enrico Gambini 2022 年 2 月 11 日
How do I convert one row of values using a unit conversion? For example, I have a row of data in a matrix that I want to convert from [km] to [m]...
PData = [2440 , 6051, 1737, 3390, 11.3, 2576;
330, 4870, 73.4, 624, 1.07E-5, 135;
3.7 8.87, 1.62, 3.71, 0.0057, 1.35]
I want this to be:
PData = [2.440 , 6.051, 1.737, 3.390, 0.0113, 2.576;
330, 4870, 73.4, 624, 1.07E-5, 135;
3.7 8.87, 1.62, 3.71, 0.0057, 1.35]

採用された回答

Enrico Gambini
Enrico Gambini 2022 年 2 月 11 日
PDATA_in_meters=PData/1000;

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeGet Started with Optimization Toolbox についてさらに検索

タグ

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by