フィルターのクリア

how to take just 4 digits after point value

3 ビュー (過去 30 日間)
Elysi Cochin
Elysi Cochin 2017 年 11 月 8 日
回答済み: Guillaume 2017 年 11 月 8 日
how to take just the 4 digits after point value (from vec1) and change the remaining to zero (as shown in vec2)
vec1 = [0.58350447046727 0.33968780507470 0.95356905156671]
vec2 = [0.58350000000000 0.33970000000000 0.95360000000000]

採用された回答

Guillaume
Guillaume 2017 年 11 月 8 日
round down to 4 decimals:
vec2 = round(vec1, 4);
display with remaining zeros:
format long
vec2
I personally greatly dislike that display format and much prefer format longg.

その他の回答 (0 件)

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by