MATLAB: Decimals number Hello.i have a vector that is: C=[1;1.0000;1.0000;1.0000] how can i see if there is any approssimations? Best Answer C ~= round(C)will return 1 for any position that is not an integer.You may also want to try something likefprintf('%.99g\n', C) Related SolutionsMATLAB: Is it possible to divide a decimal number into 3 decimal numbers >> N = 1000;>> R = 3;>> C = R+R*fix(log2(N)/R);>> M = reshape(dec2bin(N,C),[],R).'M =001111101000>> bin2dec(M)ans = 3 14 8 MATLAB: Decimal This is a user defined function available on the FEX: round2dp.To use it, you have to download it and then add to MATLAB the path where you unzip it. In MATLAB File > Set path Related QuestionHow to round a number to any precision I define
Best Answer