| New Reply |
single and double precision matlab |
Share Thread | Thread Tools |
| May9-12, 04:00 PM | #1 |
|
|
single and double precision matlab
1. The problem statement, all variables and given/known data
MATLAB uses double precision as default. How can I change this to single? so that all computations will be made using single precision. 2. Relevant equations 3. The attempt at a solution I went to: file preferences virtual reality precision: floating point: single (I changed this from double to single) However, my computations are still being made in double precision. I don't want to change a single variable to single precision (this is done using single(A)) I want to change all computations. thank you. |
| May9-12, 04:06 PM | #2 |
|
|
I do not believe there is a way to change the default arithmetic for all operations, as MATLAB variables are indeed double precision by default. Nevertheless, if you define variables to be single precision to begin with, then any operations between them will result in a single precision output.
|
| May9-12, 04:23 PM | #3 |
|
|
oh right i see. thank you.
|
| May9-12, 05:42 PM | #4 |
|
|
single and double precision matlab
I know that's not a comforting answer if you have a large code with lots of variables -- sorry!
|
| New Reply |
| Thread Tools | |
Similar Threads for: single and double precision matlab
|
||||
| Thread | Forum | Replies | ||
| Converting binary numbers to floating point format using single-precision IEEE 754 | Engineering, Comp Sci, & Technology Homework | 6 | ||
| Single precision floating point | Engineering, Comp Sci, & Technology Homework | 14 | ||
| Roundoff error - double precision is not enough | General Math | 4 | ||
| converting 29 and 0.7 to IEEE single precision floating point | Engineering, Comp Sci, & Technology Homework | 5 | ||
| single-precision floating point | Introductory Physics Homework | 0 | ||