필터 지우기
필터 지우기

how to create array as i describe down?

조회 수: 1 (최근 30일)
Abdulaziz Abutunis
Abdulaziz Abutunis 2016년 10월 19일
댓글: Abdulaziz Abutunis 2016년 10월 20일
Hello all,
Please I need help with creating an array that starts at a point (point is integer and is a result of pre calculation say the first element is 17) then the second element should be the nearest 10 ceiling which in this case is 20 and the third is 30 and the array continues till 120. so the array will be x=[17 20 30 40 50 60 70 80 90 100 110 120].
Thanks

채택된 답변

Jos (10584)
Jos (10584) 2016년 10월 19일
편집: Jos (10584) 2016년 10월 19일
x = 17
a0 = (fix(x/10)+1)*10
v = [x a0:10:120]
  댓글 수: 1
Abdulaziz Abutunis
Abdulaziz Abutunis 2016년 10월 20일
Thank you Jos for the help. This is exactly what i am looking for

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Operators and Elementary Operations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by