Does isdouble works in MATLAB

I have fixed-point toolbox installed for my MATLAB, but, the 'isdouble' function is not working. Is there any alternate function to check if a variable is double?
Thanks,

Antworten (1)

Matt Fig
Matt Fig am 24 Sep. 2012
Bearbeitet: Matt Fig am 24 Sep. 2012

2 Stimmen

A = magic(3);
B = single(A);
isa(A,'double')
isa(B,'double')
If you need the isdouble function but don't have it, you can easily make your own by using the ISA function.
What version are you using? Type this at the command line:
version
.
.
.
EDIT
You know that the isdouble function only works on fi objects, correct?
A = magic(3);
Afi = fi(A);
isdouble(A) % A is not an fi object, this will error.
isdouble(Afi) % A is an fi object, this won't error.

1 Kommentar

Abhijit
Abhijit am 24 Sep. 2012
Thanks Matt Fig for your response. i did not know the fi function.

Melden Sie sich an, um zu kommentieren.

Gefragt:

am 24 Sep. 2012

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by