Problem 42491. Quine : write a quine in MATLAB

Solution 714320

Submitted on 13 Aug 2015 by James
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) )

Suggested Problems

More from this Author10

Community Treasure Hunt

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

Start Hunting!