Problem 2. Make the vector [1 2 3 4 5 6 7 8 9 10]
Solution Stats
Problem Comments
-
38 Comments
Nice problem
nice
This is very easy thing
Great!
nice
Easy problem! Great!
Love it!
nice
Very interesting!
Great beginner problem!
nice
nice
nice
nice
nicer
nice
great
good start
very good
the solution is well used by day to day users in matlab
a=1:10
It is so easy.Don't you think?
what is difference between 123456 and 1 2 3 4 5 6 vectors?
good
Yeah, I personally like the colon operator for creating vectors!
@Muhammad Tanveer: if you take 123456 (without commas, semicolons or spaces), it is one (huge) number.
You can create a vector both by enclosing the elements in square brackets like v=[1 2 3 4 5] or using commas, like v=[1,2,3,4,5]. They mean the very same: a vector (matrix) of 1 row and 5 columns. It is up to you.
If you used a semicolon (;), then v=[1;2;3;4;5] means something else: a vector of 5 rows and one single column.
awesome!
Great idea to learn colon notation! Thanks!
cool
Why did I copy the code to the matlab editor and run it but the command line window says I didn't define a function or variable?
Easy ;)
good
easy stuff
i need more points
link is very helpful
good problem
Good practice.
good problem
Solution Comments
Show commentsProblem Recent Solvers45478
Suggested Problems
-
3923 Solvers
-
472 Solvers
-
Fix the last element of a cell array
1038 Solvers
-
435 Solvers
-
Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock. Tick. Tock.
926 Solvers
More from this Author96
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!