About Site Map Submit Contact Us Log in | Create an account
Create an account Log In
Average Rating
User Rating:
Visitors Rating:
My rating:

Write review
  • Last update: 5 years ago
  • Total downloads: 65
  • Operating system: Linux, Mac OS X, Win All, BSD, Solaris
  • Publisher: Yash (1 other programs)
See full specifications

scripts default icondivisor(n) (Scripts) Publisher's description

divisor(n) : row vector of all distinct divisors of a positive integer N, including 1 and N.

divisor(n) : row vector of all distinct divisors of a positive integer N, including 1 and N.

This function uses the default factor() routine in Matlab and hence is limited to input values up to 2^32. However if factor() routine does get updated for larger integers, this function will still work fine. Alternately you may comment out the statement that compares the values to 2^32, the factor() routine will work just fine (except maybe it will be bit slower for big numbers).
Using factor() provides a significant speed improvement over manually searching for the each divisor of n.

a = divisor(12);
returns -> a = [1, 2, 3, 4, 6, 12];

See Also:
factor, primes

System Requirements:

MATLAB 5.2 (R10)
Program Release Status: New Release
Program Install Support: Install and Uninstall

divisor(n) (Scripts) Tags:

Click on a tag to find related softwares

Is divisor(n) (Scripts) your software?

Manage your software

Most Popular

scripts default icon ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation 1.1
ASK, OOK, FSK, BPSK, QPSK, 8PSK modulation contain several functions for digital modulation simulation
scripts default icon Simulink Communication Labs 1.1
Simulink Communication Labs allows you to learn communication systems in greater depth.
scripts default icon M-QAM modulation and demodulation 1.1
M-QAM modulation and demodulation is the QAM modulation and demodulation tech.
scripts default icon LZW Compression/Decompression 1.1
LZW Compression/Decompression - Updated LZW compressor and decompressor with reasonable performance
scripts default icon InSPIRE utility to plot a 2D displacement field (Scripts) 1.0
This program plots the deformation field (displace vectors) contained in vector.txt.