Which code shows the use of ellipsis in MATLAB?

Huyền Thu

New member
Which code shows the use of ellipsis in MATLAB?
A.
A = [1 2 3;...
5 6 7]
B. A = [1;2’3]
C.
A = [1;2..
3;4]
D. A = [1:2..:2]
 
Answer: a
Explanation: Ellipsis is a method of continuing lines in MATLAB to fit in a matrix if the length is very big to be in a row. The correct syntax for ellipsis while other options will generate an error of invalid input character and unexpected MATLAB operator respectively.
A = [1 2 3;...
5 6 7]
It is another form of continuing lines but that form is called carriage return.
 

Tìm kiếm

Back
Top