📄 round_up.m
字号:
function a=round_up(b)
%This function was written by REU student Gazi K Asadullah
% b = input number
% a = output number
% This function will round up the floating point number up to 0.1
% for example, if there is a number 2.43495, if we use this function we will get it rounded up to 2.5
if (b>=0.1)
k=b*10;
m=round(k);
a=m/10;
end
if (b<0.1)
k=b*100
m=round(k)
a=m/100
end
%if b > 1
%k=b*10;
%m=round(k);
%a=m/1000;
%end
%if p > b
% a=p;
%end
% if p < b
% a=p+0.1;
% end
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -