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
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
 
%% Which graphic card is used ?
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 7.7.1
Vendor          = Brian Paul
Renderer        = Mesa X11
MaxTextureSize  = 4096
Visual          = 0x24 (TrueColor, depth 24, RGB mask 0x00ff 0xff00 0xff0000)
Software        = false
# of Extensions = 132
Driver Bug Workarounds:
OpenGLBitmapZbufferBug    = 0
OpenGLWobbleTesselatorBug = 0
OpenGLLineSmoothingBug    = 0
OpenGLClippedImageBug     = 0
OpenGLEraseModeBug        = 0
tf =
    [1x63 char]    [1x343 char]
ee =
    [1x34 char]    [1x12 char]
S =
Version         = 2.1 Mesa 7.7.1
Vendor          = Brian Paul
Renderer        = Mesa X11
MaxTextureSize  = 4096
Visual          = 0x24 (TrueColor, depth 24, RGB mask 0x00ff 0xff00 0xff0000)
Software        = false
# of Extensions = 132
Driver Bug Workarounds:
OpenGLBitmapZbufferBug    = 0
OpenGLWobbleTesselatorBug = 0
OpenGLLineSmoothingBug    = 0
OpenGLClippedImageBug     = 0
OpenGLEraseModeBug        = 0
tf =
    [1x63 char]    [1x343 char]
ee =
    [1x34 char]    [1x12 char]
y =
Brian Paul
2
Pass
 
%% prevents cheating 14-June-2012
filetext = fileread('your_fcn_name.m')
 assert(isempty(strfind(filetext, 'Brian Paul')))
filetext =
function y = your_fcn_name
S=feval(@evalc, 'opengl info')
tf = regexp(S,'Renderer','split')
ee=regexp(tf{1},'Vendor          =','split')
y= strtrim(ee{2})
end
%This code written by profile_id 504719