rescale spectra vertically.
4 次查看(过去 30 天)
显示 更早的评论
i want to show both spectra on the same plot. This will make it easy to see variability if it is present and make plots more compact. to show two or more spectra together i have to rescale spectra vertically. In the case i am showing, the second spectrum needs to be multiplied by a number around 3.7 to match the first one.
Here is how i can determine this scaling factor:
1) find indices (with Matlab's "find" function?) of points in the spectrum #1 falling between xmin and xmax in your plot.
2) calculate median value (m1) of spectrum1 in this index range
3) find indices of points in the spectrum #2 falling between xmin and xmax in your plot.
4) calculate median value (m2) of spectrum2 in this index range
5) correct spectrum2 by multiplying with m1 and dividing by m2
how can i do it in matlab?
0 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Spectral Measurements 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!