close all
clear all
fn = "X:\\901805_Coastal_Biogeochemical_Sensing\\Project.Drawings\\Project.EE.Dwgs\\nphOx\\datafiles\\nanofet5.csv";
x=csvread(fn);

vrse=x(:,2);
vk=x(:,4);
ik=x(:,3);
ib=x(:,5);
vtherm=x(:,6);

freq=fft(vrse);
freqmag=abs(freq);

numsamples=rows(vrse);

sample=(1:numsamples)';

figure('Position',[1000    600   1500     900]);
subplot(3,2,1);
grid on;
plot(sample,[vrse]);
xlabel('sample');    ylabel('V');
title('Vrse');
legend('Vrse');

%figure('Position',[1000    600   1500     900]);
subplot(3,2,2);
grid on;
plot(sample,[vk]);
xlabel('sample');    ylabel('V');
title('Vk');
legend('Vk');

%figure('Position',[1000    600   1500     900]);
subplot(3,2,3);
grid on;
plot(sample,[ib]);
xlabel('sample');    ylabel('I (nA)');
title('Ib');
legend('Ib');

%figure('Position',[1000    600   1500     900]);
subplot(3,2,4);
grid on;
plot(sample,[ik]);
xlabel('sample');    ylabel('Ik (nA)');
title('Ik');
legend('Ik');

%figure('Position',[1000    600   1500     900]);
subplot(3,2,5);
grid on;
plot(sample,[vtherm]);
xlabel('sample');    ylabel('V');
title('Vtherm');
legend('Vtherm');


figure('Position',[1000    600   1500     900]);
grid on;
plot(freqmag(2:300));
xlabel('sample');    ylabel('VFFT');
title('Vrse FFT');
legend('Vrse');
