フィルターのクリア

Why can't I save very small numbers in a vector?

3 ビュー (過去 30 日間)
Joao
Joao 2014 年 11 月 9 日
コメント済み: Neelima Dahal 2018 年 7 月 31 日
Hello!
My code is getting points like 5e-9 and i am putting these points on a vector. However after i run it i get a vector full of zeros.
Is there anyway to keep the real numbers in the vector.
Thank you

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 11 月 9 日
a=1e-9
fprintf('%.10f',a)

その他の回答 (2 件)

per isakson
per isakson 2014 年 11 月 9 日
編集済み: per isakson 2014 年 11 月 9 日
The small numbers are there, but not displayed. (My guess.) Try
>> format long
>> a = [1e9,1e-9]
a =
1.0e+09 *
1.000000000000000 0.000000000000000
>> a(2)
ans =
1.000000000000000e-09
>>

Joao
Joao 2014 年 11 月 9 日
already solved the problem.it was something else. thank you
  1 件のコメント
Neelima Dahal
Neelima Dahal 2018 年 7 月 31 日
What was it? I am dealing with the same issue here.

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

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by