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 8.0.4
Vendor          = Brian Paul
Renderer        = Mesa X11
MaxTextureSize  = 16384
Visual          = 0x3e (TrueColor, depth 32, RGB mask 0xff0000 0xff00 0x00ff)
Software        = false
# of Extensions = 146
Driver Bug Workarounds:
OpenGLBitmapZbufferBug    = 0
OpenGLWobbleTesselatorBug = 0
OpenGLLineSmoothingBug    = 0
OpenGLClippedImageBug     = 0
OpenGLEraseModeBug        = 0
tf =
    [1x63 char]    [1x344 char]
ee =
    [1x34 char]    [1x12 char]
2
Pass
 
%% prevents cheating 14-June-2012
filetext = fileread('your_fcn_name.m')
 assert(isempty(strfind(filetext, 'Brian Paul')))
filetext =
function ans = your_fcn_name
  opengl('data');
  ans.Vendor;
end
%This code written by profile_id 1379371