Cody

Problem 537. Cody Computer Part 3 - Detect the graphic card used on Cody Computer

Solution 2828067

Submitted on 13 Aug 2020
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   Fail
S=evalc('opengl info') tf = regexp(S,'Renderer','split') ee=regexp(tf{1},'Vendor =','split') y_correct= strtrim(ee{2}); assert(isequal(your_fcn_name,y_correct))

S = ' Version: '2.1 Mesa 17.1.3' Vendor: 'Brian Paul' Renderer: 'Mesa X11' MaxTextureSize: 16384 Visual: 'Visual 0x41, (RGBA 32 bits (8 8 8 8), Z depth 16 bits, Hardware acceleration, Double buffer, Antialias 0 samples)' Software: 'true' HardwareSupportLevel: 'none' SupportsGraphicsSmoothing: 0 SupportsDepthPeelTransparency: 1 SupportsAlignVertexCenters: 0 Extensions: {157×1 cell} MaxFrameBufferSize: 16384 ' tf = 1×2 cell array {' Version: '2.1 Mesa 17.1.3'↵ …'} {': 'Mesa X11'↵ MaxTextureSize: 16384↵ …'} ee = 1×1 cell array {' Version: '2.1 Mesa 17.1.3'↵ Vendor: 'Brian Paul'↵ '}

Index exceeds the number of array elements (1). Error in Test1 (line 4) y_correct= strtrim(ee{2});

2   Fail
filetext = fileread('your_fcn_name.m') assert(isempty(strfind(filetext, 'Brian Paul')))

Error using fileread (line 23) Could not open file your_fcn_name.m. No such file or directory. Error in Test2 (line 1) filetext = fileread('your_fcn_name.m')