Borrar filtros
Borrar filtros

turning a vector or matrix into an integer

18 visualizaciones (últimos 30 días)
AA
AA el 4 de Mzo. de 2015
Comentada: rantunes el 4 de Mzo. de 2015
Hi, I get the vector x=[2;3] or sometimes x=[2;3;7]. I want that to be turned into an integer number, ie. the very last number in that vector which would be 3 or 7, respectively.

Respuesta aceptada

rantunes
rantunes el 4 de Mzo. de 2015
Editada: Guillaume el 4 de Mzo. de 2015
Hey,
As far as I understood, you want to something like this:
integer = x(end);
Greets
  2 comentarios
Guillaume
Guillaume el 4 de Mzo. de 2015
Editada: Guillaume el 4 de Mzo. de 2015
Hello Rodrigo, thanks for helping, but can you format the code in your answer (either use the {} Code button or put two space in front of any line of code). It makes it much easier to read answers.
I've done it for you this time.
rantunes
rantunes el 4 de Mzo. de 2015
Okay, thank you for the tip!

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by