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
-
6 Comments
Show
3 older comments
Alfonso Nieto-Castanon
on 23 Jan 2015
(not to mention that this particular testsuite does not even test for anything at all)
Christian Schröder
on 16 Nov 2022
The merits of this problem as such nonwithstanding, your test suite is broken.
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 Solvers310
Suggested Problems
-
given 3 sides, find area of this triangle
807 Solvers
-
Make a random, non-repeating vector.
10000 Solvers
-
Change the sign of even index entries of the reversed vector
576 Solvers
-
351 Solvers
-
Finding perimeter of a rectangle
473 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!