I'm currently writing a function and to do it correctly I have to remove everything to the left of a decimal. For instance, if i do x = 5/3 and get 1.6666667 I just would like to be able to get rid if 1 and get .66666667.

 採用された回答

per isakson
per isakson 2012 年 9 月 6 日

0 投票

Try
doc rem
and
rem( 5/3, 1 )

1 件のコメント

Brian
Brian 2012 年 9 月 6 日
Thank you very much. That worked great.

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeSimulink についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by