turning a vector or matrix into an integer

28 次查看(过去 30 天)
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.

采纳的回答

rantunes
rantunes 2015-3-4
编辑:Guillaume 2015-3-4
Hey,
As far as I understood, you want to something like this:
integer = x(end);
Greets
  2 个评论
Guillaume
Guillaume 2015-3-4
编辑:Guillaume 2015-3-4
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.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Logical 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by