How to check divisibility?
367 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Caped Crusader
el 20 de En. de 2013
Respondida: Jitesh Kumar
el 25 de Sept. de 2018
Hi, I need to check whether two numbers are divisible or not. But how can I do that in Matlab? e.g. Matlab gives 1.5 for 3/2 but I need to get 3/2 = 0 and 4/2 =2.
0 comentarios
Respuesta aceptada
Azzi Abdelmalek
el 20 de En. de 2013
Editada: Azzi Abdelmalek
el 20 de En. de 2013
a=3;
b=2;
out=~rem(a,b)*a/b
4 comentarios
Más respuestas (1)
Ver también
Categorías
Más información sobre Resizing and Reshaping Matrices en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!