In Matlab, how to use variables for numbers in scientific notation (matissa and exponent)?
I am using Matlab and using numbers in scientific notation which are represented by a letter e
for an exponent. Example in Matlab:
>> 2e5 ans = 200000
Now we would like to work with numbers in scientific notation, but using variables to store the values of the mantissa and exponent (respectively to the left and right of e
). I don't understand how this can be done without merging the variable names with the letter e
for the exponent. For example:
>> rr=5;
>> 2err
??? 2err
|
Error: Unexpected MATLAB operator.
Can this be done? Or should I use the manual approach:
>> 2*10^rr ans = 200000
+3
source to share