hi i need writing a code that ceil random number without preset func like ceil,fix,

조회 수: 1 (최근 30일)
probably I need to use some loop someone's help?
  댓글 수: 2
James Tursa
James Tursa 2017년 7월 27일
Why can't you use supplied functions? (You are going to need to use some supplied functions to get this done). Is this homework? What have you done so far?
Jan
Jan 2017년 7월 28일
@yuval ohayon: The question is not clear. Which functions are not allowed? What exactly are "random numbers"? Please edit the question and add some details.

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

채택된 답변

Star Strider
Star Strider 2017년 7월 28일
If you are allowed to use the rem or mod functions, this works:
v = 100*rand(1,10);
Out = v - rem(v,1);
Out = v - mod(v,1);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

태그

아직 태그를 입력하지 않았습니다.

Community Treasure Hunt

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

Start Hunting!

Translated by