How do I extract the firing threshold value from an action potential phase plot?
Show older comments

Hi,
I am managing to produce a phase plot and I can zoom into it to see a closely approximated value for the firing threshold (first kink with a blue arrow pointing to in the attached figure). How do I extract this value without using ginput?
My code to produce the figure and extract the value using ginput:
% Roksana's script to plot .smr average AP phase plot
% 20210127
% For troubleshooting analysis - cleans the workspace
clear
close all
%Import data
load('C:\xyz.mat')
%Define channel to plot
data = xyz;
vm = data.values;
%scale x-axis by interval
t = linspace(0,length(vm)*data.interval,length(vm));
%derive membrane potential
dA = diff(data.values);
%omit last value so vectors are of equal length
data.values(end)=[];
%plot derivative dV/dt over Vm
figure;
plot(data.values,dA);
xlabel('Membrane Potential (Vm)');
ylabel('dV/dt');
title('Phase Plot');
%find firing threshold
zoom on;
pause()
zoom off;
[x, ~] = ginput
zoom out;
2 Comments
Mathieu NOE
on 2 Feb 2021
hello Roksana (again)
how is this post related to the other one ?
same topic / data ?
Roksana Khalid
on 2 Feb 2021
Accepted Answer
More Answers (0)
Categories
Find more on 2-D and 3-D Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!