How to display decimal places

1 回表示 (過去 30 日間)
Tanner Schmitt
Tanner Schmitt 2019 年 4 月 9 日
回答済み: Star Strider 2019 年 4 月 9 日
So I am programming a loop that multiplies by 10, but I need it to display 2 decimal places, how do I do that? This is what I have so far:
clc
for i = 1.00:1.00:15.00
k = i*10
end

採用された回答

Star Strider
Star Strider 2019 年 4 月 9 日
There are several options, one of which is to choose the format (link) type for what you want to do. I will let yoiu explore the linked documentation at your leisure.

その他の回答 (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