increase number of decimals

272 views (last 30 days)
Lane Schnell
Lane Schnell on 8 Apr 2020
Answered: James Tursa on 8 Apr 2020
Hi I am making a step solver where .000014 is added to .1 over 100000 times but since matlab only shows 4 decimal places I only get .1000 alot. How do I increase the number of decimal places so that on the second iteration it will be .1000014, then third iteration .1000028 and so on. Ive already tried going to prefeneces, then varialbles and changing the default array format to long.

Accepted Answer

James Tursa
James Tursa on 8 Apr 2020
Just type your format at the command line. E.g.,
format longg

More Answers (0)

Community Treasure Hunt

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

Start Hunting!