the function "hist" can be used to calculate frequencies of numeric data for given intervals. For instance, if x is a vector with numeric data, and if you type >> F=hist(x) in the command window, it will create the variable F that contains the frequencies of elements in x in each of 10 equally spaced intervals (the 10 intervals are automatically created by default). If you simply type >>hist(x), Matlab will plot a histogram with the frequencies at 10 numeric intervals. For more options, type >>help hist.
For instance, try the following:
>>x=randn(1000,1); %create a vector x with 1000 normally distributed random values
>>hist(x,20) %plots the histogram of frequencies of x using 20 intervals
If you want to store information on a variable F:
>>[F,c]=hist(x,20); %stores the frequencies in the 20x1 vector F, and the value at the center of each interval in the 20x1 vector c
>>bar(c,F) %an alternative way of plotting the frequencies.
I am assuming you are interested in numeric (and not categorical) data, am I right?
Dear Sanjay, in Mathematica there are the built in functions e.g. Fourier for computing spectral frequencies or Histogram for plotting values frequency distribution. You can see relative documentation in Wolfram site. Gianluca