Help CenterHelp Center
Convert wavelength to frequency
freq = wavelen2freq(wavelen)
freq = wavelen2freq(wavelen,c)
[freq,c] = wavelen2freq(___)
example
freq= wavelen2freq(wavelen)converts wavelengthwavelento frequencyfrequsing the speed of light in vacuum.
freq= wavelen2freq(wavelen)
freq
wavelen
freq= wavelen2freq(wavelen,c)also specifies the signal propagation speedc.
freq= wavelen2freq(wavelen,c)
c
[freq,c] = wavelen2freq(___)还返回传播speedcused to compute frequencyfreq. Use this syntax with any of the input arguments in previous syntaxes.
collapse all
Calculate the frequencies corresponding to wavelengths of 1 and 4 cm. Use the default speed of propagation.
wavelen = [1e-2,4e-2]; freq = wavelen2freq(wavelen)
freq =1×21010× 2.9979 0.7495
Calculate the frequency corresponding to a wavelength of 2 cm. Obtain the propagation speed used to compute the frequency.
wavelen = 0.02; [freq,c] = wavelen2freq(wavelen,3.0e8)
freq = 1.5000e+10
c = 300000000
Signal wavelength, specified as a positive scalar or length-Mvector of positive values. Units are in meters.
Signal propagation speed, specified as a positive scalar. The default value is obtained fromphysconst('Lightspeed'). Units are in m/s.
physconst('Lightspeed')
Example:3.0e8
Data Types:double
double
Signal frequency, specified as a positive scalar or a length-Mvector of positive values. The size offreqequals the size ofwavelen. Units are in Hz.
Example:10e6
10e6
Signal propagation speed, returned as a positive scalar. Units are in m/s.
freq2wavelen
You have a modified version of this example. Do you want to open this example with your edits?
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select:.
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office