Problem 42491. Quine : write a quine in MATLAB

Solution 735352

Submitted on 15 Sep 2015 by Alfonso Nieto-Castanon
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
%% Test for Quine nl = char(10); contents = strsplit(fileread('quine.m'),nl); ref_contents = [strjoin(contents(1:end-2),nl), nl]; actual_contents=quine(); assert( isequal(ref_contents,actual_contents) )