필터 지우기
필터 지우기

turning a vector or matrix into an integer

조회 수: 18 (최근 30일)
AA
AA 2015년 3월 4일
댓글: rantunes 2015년 3월 4일
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.
rantunes
rantunes 2015년 3월 4일
Okay, thank you for the tip!

댓글을 달려면 로그인하십시오.

추가 답변 (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