Problem 2856. Matlab Basics - Create a row vector
Write a Matlab script to create a row vector of 10 consecutive numbers
x = [1 2 3 4 5 6 7 8 9 10]
Solution Stats
Problem Comments
-
5 Comments
Show
2 older comments
Alfonso Nieto-Castanon
on 23 Jan 2015
While I understand that experimenting with creating problems is half the fun of Cody this is a somewhat extreme example of a repetitive problem that seems unnecessary, so yes, I agree with Jean-Marie here that perhaps some form of user-based curation like that in Answers or minimum user-requirements for creating problems might help
Alfonso Nieto-Castanon
on 23 Jan 2015
(not to mention that this particular testsuite does not even test for anything at all)
George Berken
on 28 Feb 2023
%% Yaz Majeed, please fix your Test 1.
assert(isequal(diff(create_row),ones(1,9)))
Solution Comments
Show commentsProblem Recent Solvers311
Suggested Problems
-
Getting the absolute index from a matrix
250 Solvers
-
385 Solvers
-
494 Solvers
-
1374 Solvers
-
6641 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!