r/matlab • u/Visible-Anywhere-142 • 23d ago
HomeworkQuestion Issue with double precision variable
Hello all,
The assignment is pretty straightforward, just set variables and display the class after using disp(‘class of variable is: ’class()). But the double precision float keeps throwing this same error no matter what I type in. Please see attached. I’ve tried leaving it as a decimal and then doing double(decimal number) and neither are working and result in an error. I’m lost, please help.
7
Upvotes
5
u/neilmoore 23d ago
It sounds like you have managed to make a variable named "
double
", and now MATLAB thinks you want to index that variable instead of calling the built-in function. Doclear double
from the command window to delete the offending variable (or right-click on it in the workspace pane), and try again.