How to select specific no of terms from a sequence

조회 수: 3 (최근 30일)
sadiqa ilyas
sadiqa ilyas 2019년 9월 21일
댓글: sadiqa ilyas 2019년 9월 22일
Hi, I have around 1700 values and i want matlab to get input and then select 256 values after the given input. I dont know how to do this
U=unique(point2(:,2));
input('enter b_i');% suppose b_i=U(89) then i want next 256 values except inf. inf can come in the sequence
  댓글 수: 3
the cyclist
the cyclist 2019년 9월 21일
편집: the cyclist 2019년 9월 21일
What you are asking for is unclear to me.
Is b_i going to be the index of the element (i.e. does b_i==5 mean start at the 5th element of U)? Or is b_i the value of the element (i.e. you need to find the value 5 inside of U, and start from there)?
And then, you need to find the next 256 non-infinite elements -- but also include any values of infinity that are interspersed along with them? Is that right?
sadiqa ilyas
sadiqa ilyas 2019년 9월 22일
I have seventeen hundred number e.g stored in U.i.e
U=0,3,8,234,567,89,1665,34,inf,78.......
b_i is the input and it should be from U
e.g i enter b_i=U(3) which is 8
then i need next 256 values starting from 8 and if inf comes in the sequence then ignore infinity and pick the next value

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Functions에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by