Problem 44243. Ternary Conditional Operator
Good idea to write matlab code as the other language like c.
Maybe I just don't have the matlab skills for this problem, but maybe the test suite is broken which makes it impossible to solve:
The test suite has been fixed. (The initial line is no longer commented out.)
Another problem in the test suite? The 2nd line in the test suite:
movefile submission/colon.m @function_handle
gives an error:
The function colon is a built-in MATLAB function. Please use a different function name.
Solution CommentsShow comments
Problem Recent Solvers11
Sort a list of complex numbers based on far they are from the origin.
Project Euler: Problem 1, Multiples of 3 and 5
Create logical matrix with a specific row and column sums
Detect a number and replace with two NaN's
More from this Author8
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!Start Hunting!