iif.m

Emulates the ?: functionality of C and C++.
1.2K Downloads
Updated 12 Dec 2005

No License

Evaluates a condition and returns one of two parameters based on the result.

Usage:
% iif(cond, t, f)
% Returns t if cond == true, and f otherwise.

Cite As

Christopher Granade (2026). iif.m (https://www.mathworks.com/matlabcentral/fileexchange/9325-iif-m), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R13
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on Data Import and Analysis in Help Center and MATLAB Answers
Version Published Release Notes
1.0.0.0