Find ratio between two signals

时间:2016-05-13 15:32:14

标签: matlab plot figure

We are recording two fluorescences signals from a mouse with an optical fiber. The mouse is a control one so the signals have different intensity but have the same shape.

I want to find and plot the ratio of the two signals and I want my ratio to be stable. In fact when we'll test a normal mouse we want to use that ratio to eliminate noises.

Plot of the two signals:
Plot of the two signals

I used that code to try to do the ratio

value = xlsread('souris.xlsx'); %Open file with the two signals
yGreenFluo = value(:,2) - 1585; %The 0 for the laser is at 1585
yRedFluo = value(:,3) - 1585; %The 0 for the laser is at 1585
yGreenNormalize = yGreenFluo /norm(yGreenFluo) ; %Normalize
yRedNormalize = yRedFluo /norm(yRedFluo); %Normalize
coeff = polyfit(yRedNormalize, yGreenNormalize, 1); %Do a linear regression
b = coeff(2);
ratio = (yGreenNormalize - b) / yRedNormalize;

So now I show what I get when I plot the ratio

plot of the ratio:
plot of the ratio

As you can see it doesn't work... I have really no clue how to do it...

0 个答案:

没有答案