Borrar filtros
Borrar filtros

whats the command to find quotient in MATLAB 2008b ?

67 visualizaciones (últimos 30 días)
Sivakumaran Chandrasekaran
Sivakumaran Chandrasekaran el 12 de Jul. de 2013
Respondida: Saksham Popli el 28 de Oct. de 2020
whats the command to find quotient in MATLAB 2008b ?
  1 comentario
Rednar
Rednar el 12 de Jul. de 2013
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

Iniciar sesión para comentar.

Respuestas (3)

Azzi Abdelmalek
Azzi Abdelmalek el 12 de Jul. de 2013
q=fix(20/6)
r=mod(20,6)

the cyclist
the cyclist el 12 de Jul. de 2013
Editada: the cyclist el 12 de Jul. de 2013
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 el 28 de Oct. de 2020
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

Categorías

Más información sobre Logical en Help Center y File Exchange.

Etiquetas

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by