필터 지우기
필터 지우기

whats the command to find quotient in MATLAB 2008b ?

조회 수: 67 (최근 30일)
Sivakumaran Chandrasekaran
Sivakumaran Chandrasekaran 2013년 7월 12일
답변: Saksham Popli 2020년 10월 28일
whats the command to find quotient in MATLAB 2008b ?
  댓글 수: 1
Rednar
Rednar 2013년 7월 12일
You could use the function "idivide" which includes the rounding option. http://www.mathworks.co.uk/help/matlab/ref/idivide.html
The simple way though would be to do A./B

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

답변 (3개)

Azzi Abdelmalek
Azzi Abdelmalek 2013년 7월 12일
q=fix(20/6)
r=mod(20,6)

the cyclist
the cyclist 2013년 7월 12일
편집: the cyclist 2013년 7월 12일
You're probably going to want to use one of the slash operators:
doc slash
for details.
For example:
A = [1 2 3];
B = [7 8 9];
C = A./B;

Saksham Popli
Saksham Popli 2020년 10월 28일
function r=digit_sum(input)
r=rem(input,10);
q=fix(input/10);
if q==0
r=r;
else
r=r+digit_sum(q);
end
end

카테고리

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