what does this line mean

Answers (1)

Benjamin Großmann
Benjamin Großmann on 26 Feb 2020

0 votes

ones(r, c) creates an array of ones with r rows and c columns. That said, ones(1, c) creates a line vector with c elements. Here, four line vectors are created and written side by side in one line vector. Therefore, t is a line vector containing 10 ones, 10 twos, 15 threes and 10 fours.

This question is closed.

Tags

Asked:

on 26 Feb 2020

Closed:

on 20 Aug 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!