display numbers in 'format long'

While using of 'sprintf', numbers not display in 'format long' form. for example:
sprintf('%d',0.987654345698)
ans =
9.876543e-001
how can it be shown in 'format long' form?

 采纳的回答

Fangjun Jiang
Fangjun Jiang 2011-9-17

1 个投票

sprintf('%30.10f',pi*1e5)
doc sprintf for more details.

更多回答(0 个)

类别

在 帮助中心 和 File Exchange 中查找有关 MATLAB 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by