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 comentario

Jan
Jan el 7 de Dic. de 2011
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.

Iniciar sesión para comentar.

 Respuesta aceptada

Andrei Bobrov
Andrei Bobrov el 7 de Dic. de 2011

0 votos

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.

Más respuestas (0)

Categorías

Etiquetas

Preguntada:

el 7 de Dic. de 2011

Community Treasure Hunt

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

Start Hunting!

Translated by