Formats in Matlab
From: Cilla (cilla2_at_mail.china.com)
Date: 02/25/05
- Next message: andy2o: "Re: eig vs eigs"
- Previous message: Gottfried Helms: "Re: Eigenvalue Problem (Princ. Comp.) as Optimization Poblem"
- Next in thread: Steven Lord: "Re: Formats in Matlab"
- Reply: Steven Lord: "Re: Formats in Matlab"
- Messages sorted by: [ date ] [ thread ]
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!
- Next message: andy2o: "Re: eig vs eigs"
- Previous message: Gottfried Helms: "Re: Eigenvalue Problem (Princ. Comp.) as Optimization Poblem"
- Next in thread: Steven Lord: "Re: Formats in Matlab"
- Reply: Steven Lord: "Re: Formats in Matlab"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|
|