Problem 2925. Matlab Basics II - Create a 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]
make sure to round UP when n is a decimal, and take the absolute value when n is negative
Solution Stats
Problem Comments
Solution Comments
Show commentsProblem Recent Solvers243
Suggested Problems
-
The Hitchhiker's Guide to MATLAB
3346 Solvers
-
277 Solvers
-
Create an anti-identity matrix
192 Solvers
-
459 Solvers
-
Replace every 3rd element in a vector with 4
253 Solvers
More from this Author28
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!