Formats in Matlab

From: Cilla (cilla2_at_mail.china.com)
Date: 02/25/05


Date: Fri, 25 Feb 2005 20:40:54 +0000 (UTC)

Hi! I have a problem with the number format in Matlab. I've written
an m-file that calculates a couple of things, and then I store the
results in a vector. So I would get answers like 0, 2, 1.6797e+10.
When this gets stored, the 2 basically falls away and becomes zero,
because it's converted the answers in the form of 1.0e+10. Hence, my
while loop never terminates, because my condition is never met, since
some of my answers are falling away, due to the errors. I tried
typing format short before running my m-file, but that didn't work. I
tried typing 'format short (f)', but that didn't work. Is there any
way of possibly rounding off my 1.6797e+10, or making sure my 2
doesn't fall away, in my vector? Please help! I would appreciate it!



Relevant Pages

  • Re: apply export style to figure via m file
    ... My idea was to use this nice gui to create a style, ... which i can use to format all the plots i need to. ... to write a script, where you plot, set a style and print as ... change some parts of the code from this generated M-File. ...
    (comp.soft-sys.matlab)
  • Re: apply export style to figure via m file
    ... My idea was to use this nice gui to create a style, ... which i can use to format all the plots i need to. ... to write a script, where you plot, set a style and print as ... change some parts of the code from this generated M-File. ...
    (comp.soft-sys.matlab)
  • Re: Formats in Matlab
    ... I have a problem with the number format in Matlab. ... > an m-file that calculates a couple of things, and then I store the ... > typing format short before running my m-file, ...
    (sci.math.num-analysis)
  • figures
    ... I am trying to save multiple figures generated from the improfile ... command as .fig format. ... How do I do it from a m-file? ...
    (comp.soft-sys.matlab)
  • Re: GENERATING AUTOMATIC NUMBERS
    ... I suggest you store two fields: ... > Date-auto increment format. ... Year in NN format, Julian Date in NNN format, ... I would like this feature to key off when the the preceding field, ...
    (microsoft.public.access.formscoding)