This isn't a great question, but I'll try to answer:
All the files that I have, have two channels.
A spectrogram can only show one channel at a time. Either make one spectrogram for each channel, or average your channels together into one. Here's an example of the syntax I found with a quick google search:
[y, fs]=wavread(fileName); % Read wave file
left=y(:,1); % Left channel
right=y(:,2); % Right channel
then you can do
I know that the Spectrogram is supposed to give you an idea of the fundamental frequencies present in your audio file.
Not quite. The term "fundamental frequency" means something different.
What does the Spectrogram exactly do?
It shows the frequency spectrum of the signal and how it changes over time. If the beginning of the signal is white noise (flat spectrum), and the end of the signal is a tone (spikey spectrum), the spectrogram will show how it changed from one spectrum to the other over time. It does this by dividing the signal up into small chunks and calculating the spectrum of each chunk.
What do the parameters mean? This is the structure of the Spectrogram function call : S=spectrogram(x,window,noverlap,nfft,fs). What do the window and noverlap parameters mean?
Did you read the documentation?
window is a window function that is applied to each chunk of the file before the frequency transform. If you didn't use a window function, there would be abrupt changes at the beginning and end of each chunk, which produce wide frequency components that you don't want. The window function is like a "fade-in, fade-out" envelope, so that you only see the spectrum of the middle of the chunk, and not the artifacts caused by chopping the chunk abruptly at the endpoints.
noverlap is the number of samples that each chunk overlaps the next. The windowing function attenuates the signal to near 0 at the boundaries of each chunk, so if you didn't overlap the chunks at all, you would be emphasizing parts of the signal and ignoring other parts. The overlap lets you measure the same part of the signal twice, once in the middle of the chunk where it's important, and once at the ends where it's mostly ignored.
How do I set these parameters?
Basically you try different ones and see which is best at showing you what you want to see. Different window functions are designed to do different things, so read about them and what they are meant to do.
Are they input file dependent?
Only if you're looking for different types of things in different files.