PDA

View Full Version : what does this mean in matlab?


sara_87
Oct29-09, 05:27 PM
1. The problem statement, all variables and given/known data

what does this mean in matlab:

y =

1.0e+012 *

Columns 1 through 9

0.0000 -0.0000 0.0000 -0.0000 0.0000 -0.0000 0.0002 -0.0181 2.5985

Column 10

-4.6276

2. Relevant equations



3. The attempt at a solution

i understand that y is a vector with 10 elements but what does 1.0e+012 * mean?

Mark44
Oct29-09, 06:16 PM
1.0e+012 means 1.0 X 1012. It's a notation used in computer circles that's very similar to scientific notation.

I don't know about the *, if that's just something you added. If not, I don't know what that means.

sara_87
Oct29-09, 06:33 PM
no, i didnt add it...it's actually there.
so, for the values in the first post, the first 6 values are just 0. and the rest are mutiplied by 1.0 X 10^12
?

Mark44
Oct29-09, 06:45 PM
Sounds reasonable to me.

sara_87
Oct30-09, 03:33 PM
but what if the value is:
0.000000087
matlab just puts:
0.000000
assumes this is 0?

Mark44
Oct30-09, 04:03 PM
I'm guess that this is a format problem. Try this statement in your script:

format long

For other options, see your matlab documentation.

sara_87
Oct30-09, 04:35 PM
thanks!
format long works nicely
;)