Cody

Problem 42933. Vector with a repeated entry

Create a row vector of length n, filled with 4's. For example, if n = 3,

output = [4 4 4]

Hint:

Search for the function 'ones' in MATLAB help.

Example: y = ones (1,5) = [1 1 1 1 1]

Solution Stats

45.54% Correct | 54.46% Incorrect
Last Solution submitted on May 25, 2020

Problem Comments