How to check divisibility?
335 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
採用された回答
Azzi Abdelmalek
2013 年 1 月 20 日
編集済み: Azzi Abdelmalek
2013 年 1 月 20 日
a=3;
b=2;
out=~rem(a,b)*a/b
4 件のコメント
その他の回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Resizing and Reshaping Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!