y = fix(x);
The solution which I presented just now works perfectly fine on the live editor of Matlab, but don't know why math works still say it is incorrect?
use fix instead of floor or ceil command
Longest run of consecutive numbers
1646 Solvers
Calculate the Number of Sign Changes in a Row Vector (No Element Is Zero)
225 Solvers
373 Solvers
Matlab Basics - Create a row vector
277 Solvers
273 Solvers
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!