Q:

Write a fives function that will receive two arguments for the number of rows and columns, and will return a matrix with that size of all fives

0

 Write a fives function that will receive two arguments for the number of rows and columns, and will return a matrix with that size of all fives.

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

fives.m

function five = fives(r,c)

% Returns a matrix of fives of specified size

% Format of call: fives(rows, cols)

% Returns a rows by cols matrix of all fives

% Initialization

five = zeros(r,c) + 5;

end

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now