Problem 45173. Create the flag of Ramumbia
The little known nation of Ramumbia has a very simple flag. It is made up of vertical stripes, Red, Green, Blue, that are equally spaced and with no gap between said stripes.
The artist that designed the flag has been very clear; "If the flag is not divisible into three, equal, vertical segments, this flag shall not exist!" However, bizarrely, the designer has given no guidance on the aspect ratio of the flag.
Your task is to write a function which can reproduce said flag as a hypermatrix, viewable by the "imshow" function. The inputs to the function are the length, L and width, W of the flag, but remember, unless the width is divisible by three with no remainders, the flag will be blank (i.e. a hypermatrix of zeros of the appropriate size)
Solution CommentsShow comments
Problem Recent Solvers13