Cody

Problem 688. Convert a structure into a string

Solution 88714

Submitted on 14 May 2012 by Brett Shoelson
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

This solution is outdated. To rescore this solution, sign in.

Test Suite

Test Status Code Input and Output
1   Pass
%% Test the example s.age = '33' s.prenom ='aurélien' str_correct = ['33',10,'aurélien'] assert(isequal(your_fcn_name(s),str_correct))

s = age: '33' s = age: '33' prenom: 'aurélien' str_correct = 33 aurélien str = 33 aurélien

2   Pass
%% Another example s.f1 = 'Sunday'; s.f2 = 'Monday'; s.f3 = 'Tuesday'; s.f4 = 'Wednesday'; s.f5 = 'Thursday'; s.f6 = 'Friday'; s.f7 = 'Saturday'; str_correct = ['Sunday',10,'Monday',10,'Tuesday',10,'Wednesday',10,'Thursday',10,'Friday',10,'Saturday'] assert(isequal(your_fcn_name(s),str_correct))

str_correct = Sunday Monday Tuesday Wednesday Thursday Friday Saturday str = Sunday Monday Tuesday Wednesday Thursday Friday Saturday

Suggested Problems

More from this Author30

Community Treasure Hunt

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

Start Hunting!