Hi,
It seems you are trying to make use of FULL WIDTH AND HALF MAXIMUM (FWHM) and wavelength values to obtain a Gaussian curve.
You can make use of the relation between "sigma" and "FWHM", which is given as:
sigma = FWHM / (2 * sqrt(2 * log(2)));
The sigma obtained can be used in the Gaussian curve formula along with the wavelength values. Refer to an example code below for a better understanding:
% Define the FWHM and central wavelength
FWHM = 10; % Replace with your actual FWHM value
central_wavelength = 500; % Replace with your actual wavelength value
% Calculate the standard deviation (sigma) from the FWHM
% The relationship between FWHM and sigma for a Gaussian function is:
% FWHM = 2 * sqrt(2 * log(2)) * sigma
sigma = FWHM / (2 * sqrt(2 * log(2)));
% Create a range of wavelength values around the central wavelength
wavelengths = linspace(central_wavelength - 3*FWHM, central_wavelength + 3*FWHM, 1000); % This is an example range and can be changed as per the requirements
% Calculate the Gaussian function values for those wavelengths
gaussian_values = (1 / (sigma * sqrt(2*pi))) * exp(-((wavelengths - central_wavelength).^2) / (2 * sigma^2));
% Plot the Gaussian curve
plot(wavelengths, gaussian_values);
title('Gaussian Curve');
xlabel('Wavelength');
ylabel('Intensity');
grid on;