I would let the output speak for itself:
>> numFiles, meanTangle, sdTangle
numFiles =
526
meanTangle =
0.4405
sdTangle =
0.1285
Now, when I create a vector out of these variables:
>> [numFiles meanTangle sdTangle]
ans =
526 0 0
Also, just for clarification:
>> class(numFiles)
ans =
int32
>> class(meanTangle)
ans =
double
>> class(sdTangle)
ans =
double
Why does MATLAB convert floats (meanTangle
and sdTangle
) to int without cast?
It converts all of your doubles to ints because your array contains a single int. This has to do with a precision issue.
It converts the entire array into type int32:
>> class(ans)
ans =
int32
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With