write a function file, a - doublerovtriplecolumn (m, n), that takes 2 integers m and n and 02 creates an array a of size m x a where every element of a will be 2°row number +3*column number. in matlab

main.m
function a = doublerovtriplecolumn(m, n)
    a = zeros(m, n); % Initializing an m x n array with zeros
    for i = 1:m
        for j = 1:n
            a(i, j) = 2^(i) + 3*(j); % Filling the array based on the given formula
        end
    end
end
247 chars
9 lines

related categories

gistlibby LogSnag