Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Solution 172873

Submitted on 5 Dec 2012 by Aurelien Queffurust

Correct

65Size
Leading solution size is 26.
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test
Code Input and Output
1
Pass
 
%%
[W,H]=teledims(2.4,1,46);
assert(H == 17.7 && W == 42.5)
tot =
                      6.76
H =
          17.6923076923077
W =
          42.4615384615385
H =
                      17.7
W =
                      42.5
2
Pass
 
%%
[W,H]=teledims(4,3,32);
assert(H == 19.2 && W == 25.6)
tot =
    25
H =
                      19.2
W =
                      25.6
H =
                      19.2
W =
                      25.6
3
Pass
 
%%
[W,H]=teledims(3,2,60);
assert(H == 33.3 && W == 49.9)
tot =
    13
H =
          33.2820117735137
W =
          49.9230176602706
H =
                      33.3
W =
                      49.9
4
Pass
 
%%
[W,H]=teledims(1.85,1,42);
assert(H == 20.0 && W == 36.9)
tot =
                    4.4225
H =
          19.9717154433499
W =
          36.9476735701973
H =
    20
W =
                      36.9
5
Pass
 
%%
[W,H]=teledims(3,2,1000);
assert(H == 554.7 && W == 832.1)
tot =
    13
H =
          554.700196225229
W =
          832.050294337844
H =
                     554.7
W =
                     832.1
6
Pass
 
%%
[W,H]=teledims(16,10,92);
assert(H == 48.8 && W == 78.0)
tot =
   356
H =
          48.7599024802926
W =
          78.0158439684681
H =
                      48.8
W =
    78
7
Pass
 
%%
[W,H]=teledims(2.4,1,92);
assert(H == 35.4 && W == 84.9)
tot =
                      6.76
H =
          35.3846153846154
W =
          84.9230769230769
H =
                      35.4
W =
                      84.9
8
Pass
 
%%
[W,H]=teledims(16,10,32);
assert(H == 17.0 && W == 27.1)
tot =
   356
H =
          16.9599660801018
W =
          27.1359457281628
H =
    17
W =
                      27.1
9
Pass
 
%%
[W,H]=teledims(3,2,82);
assert(H == 45.5 && W == 68.2)
tot =
    13
H =
          45.4854160904688
W =
          68.2281241357032
H =
                      45.5
W =
                      68.2
10
Pass
 
%%
[W,H]=teledims(16,10,82);
assert(H == 43.5 && W == 69.5)
tot =
   356
H =
          43.4599130802608
W =
          69.5358609284172
H =
                      43.5
W =
                      69.5
11
Pass
 
%%
[W,H]=teledims(16,10,60);
assert(H == 31.8 && W == 50.9)
tot =
   356
H =
          31.7999364001908
W =
          50.8798982403053
H =
                      31.8
W =
                      50.9
12
Pass
 
%%
[W,H]=teledims(3,2,92);
assert(H == 51.0 && W == 76.5)
tot =
    13
H =
          51.0324180527211
W =
          76.5486270790816
H =
    51
W =
                      76.5
13
Pass
 
%%
[W,H]=teledims(1.85,1,1000);
assert(H == 475.5 && W == 879.7)
tot =
                    4.4225
H =
          475.517034365474
W =
          879.706513576127
H =
                     475.5
W =
                     879.7
14
Pass
 
%%
[W,H]=teledims(2.4,1,42);
assert(H == 16.2 && W == 38.8)
tot =
                      6.76
H =
          16.1538461538462
W =
          38.7692307692308
H =
                      16.2
W =
                      38.8
15
Pass
 
%%
[W,H]=teledims(1.85,1,27);
assert(H == 12.8 && W == 23.8)
tot =
                    4.4225
H =
          12.8389599278678
W =
          23.7520758665554
H =
                      12.8
W =
                      23.8
16
Pass
 
%%
[W,H]=teledims(16,10,82);
assert(H == 43.5 && W == 69.5)
tot =
   356
H =
          43.4599130802608
W =
          69.5358609284172
H =
                      43.5
W =
                      69.5
17
Pass
 
%%
[W,H]=teledims(4,3,46);
assert(H == 27.6 && W == 36.8)
tot =
    25
H =
                      27.6
W =
                      36.8
H =
                      27.6
W =
                      36.8
18
Pass
 
%%
[W,H]=teledims(2.4,1,60);
assert(H == 23.1 && W == 55.4)
tot =
                      6.76
H =
          23.0769230769231
W =
          55.3846153846154
H =
                      23.1
W =
                      55.4
19
Pass
 
%%
[W,H]=teledims(4,3,92);
assert(H == 55.2 && W == 73.6)
tot =
    25
H =
                      55.2
W =
                      73.6
H =
                      55.2
W =
                      73.6
20
Pass
 
%%
[W,H]=teledims(1.85,1,60);
assert(H == 28.5 && W == 52.8)
tot =
                    4.4225
H =
          28.5310220619284
W =
          52.7823908145676
H =
                      28.5
W =
                      52.8