% plot transients of Ca, IP3, IP3Ropen, IP3Rinh, and CaStore

clear

file_head = 'noCB_CFat'
Caextention = 'msec_Ca.plot'

% Including GENESIS plot files to MATLAB

for i = 1:12
    dt = i * 100 - 400 
    CaFileFullName = strcat(file_head, int2str(dt), Caextention);
    Catmp = load(CaFileFullName);
    Ca(:,i) = Catmp(:,2) - (i * 5) + 65 ;
end

% plot Ca
plot(-350:500,Ca(151:1001, 1), -250:500,Ca(251:1001, 2), -150:500,Ca(351:1001, 3), -50:500,Ca(451:1001, 4), ...
      -50:600,Ca(451:1101, 5),  -50:700,Ca(451:1201, 6),  -50:800,Ca(451:1301, 7), -50:900,Ca(451:1401, 8), ...
      -50:1000,Ca(451:1501, 9), -50:1000,Ca(451:1501,10), -50:1000,Ca(451:1501,11), -50:1000,Ca(451:1501,12))
axis([-500 1000 0 70])
set(gca,'xtick',[-400 -300 -200 -100 0 100 200 300 400 500 600 700 800 900])
set(gca,'ytick',[0 5 10 15 20 25 30 35 40 45 50 55 60 65 70])
xlabel('Time (ms)')
ylabel('[Ca2+] (\muM)')