Cody

# Problem 2019. Dimensions of a rectangle

Solution 607906

Submitted on 28 Mar 2015 by Riyasat
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 = 1 length_correct = 3/sqrt(10); width_correct = 1/sqrt(10); [width, length] = rectangle(x); tolerance = 1e-12; assert( abs(length-length_correct)<tolerance && abs(width-width_correct)<tolerance )

x = 1

2   Pass
%% x = 2; width_correct = 2/sqrt(10); length_correct = 6/sqrt(10); [width, length] = rectangle(x); tolerance = 1e-12; assert(abs(length-length_correct)<tolerance && abs(width-width_correct)<tolerance)
{"ft_lang_label":"__label__en","ft_lang_prob":0.556847,"math_prob":0.9971485,"size":756,"snap":"2019-51-2020-05","text_gpt3_token_len":223,"char_repetition_ratio":0.17952128,"word_repetition_ratio":0.05940594,"special_character_ratio":0.31746033,"punctuation_ratio":0.11904762,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9933442,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-01-23T05:25:20Z\",\"WARC-Record-ID\":\"<urn:uuid:dc4c7641-f6c8-47af-bb94-94fea0caf6cc>\",\"Content-Length\":\"73149\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:4459155f-9f3a-4bce-b668-2e1510c872d8>\",\"WARC-Concurrent-To\":\"<urn:uuid:c5d14eb4-6130-4c3b-b173-ae270d407741>\",\"WARC-IP-Address\":\"23.50.228.199\",\"WARC-Target-URI\":\"https://de.mathworks.com/matlabcentral/cody/problems/2019-dimensions-of-a-rectangle/solutions/607906\",\"WARC-Payload-Digest\":\"sha1:5KYSSFKV7Z7DBZUDW54OZXFJIBNBLYBE\",\"WARC-Block-Digest\":\"sha1:SMEQEWOVXU74V5EPAZQXCGDLH5GPZ4EK\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-05/CC-MAIN-2020-05_segments_1579250608295.52_warc_CC-MAIN-20200123041345-20200123070345-00301.warc.gz\"}"}