Integer or Float? - MATLAB Cody - MATLAB Central

Problem 2384. Integer or Float?

  • Created by RA
Difficulty:Rate

Test an input to see whether it is an integer or a floating point number. If it is an integer return 1 for 'true'. Otherwise return 0 for 'false'.

Examples

 1. x=1
    y=1
 2. x=1.5
    y=0
 3. x=0
    y=1

Solution Stats

62.92% Correct | 37.08% Incorrect
Last Solution submitted on Apr 26, 2025

Problem Comments

Solution Comments

Show comments
PIVlab surpasses 100K all-time File Exchange downloads
During the past twelve months, PIVlab, a MATLAB Community Toolbox for particle...
4
8

Problem Recent Solvers222

Suggested Problems

More from this Author3

Problem Tags

Community Treasure Hunt

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

Start Hunting!