How to fill a table using (end,:)

Hello everyone!
I have a table for example A=[2,11,33;41,25,92;11,20,14] and i want to add a new row in the end.Something like that:
A(end+1,:)=...?
My problem is that i don't know how to syntax the right part..
Thanks.

1 个评论

You know the syntax for a [3 x 3] matrix, as we see in your question. Now your need the syntax for a [1 x 3] vector.
This is a very basic question and I stronlgy suggest to read the Getting Started chapters in the documentation.

请先登录,再进行评论。

 采纳的回答

A=[2,11,33;41,25,92;11,20,14]
% e.g.
A(end+1,:)= rand(1,size(A,2))
or
A(end+1,:)= [3 5 6]
ets.

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Creating, Deleting, and Querying Graphics Objects 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by