Cody

Problem 42500. replace empty matrices with '[]'

Solution 2988073

Submitted on 24 Sep 2020 at 17:56 by David Hill
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Pass
x = int8.empty(3,0); y_correct = []; assert(isequal(funny(x),y_correct))

2   Pass
text=fileread('funny.m'); assert(isempty(strfind(text,'[]'))) assert(isempty(strfind(text,'empty')))

Suggested Problems

More from this Author1

Community Treasure Hunt

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

Start Hunting!