I plot x-y graph (Gaussian function) and want to get the x-axis value (will be two points in this case) at a certain y-axis value (half of the maximum)
I tried this but it didn't work:
clc;clear all;Fs = 150; % Sampling frequency
t = -0.5:1/Fs:0.5; % Time vector of 1 second
x = 1/(sqrt(2*pi*0.01))*(exp(-t.^2/(2*0.01)));figure;plot(t,x);xi = 0.5*max(x) ;z=find(x==xi);ti = x(z) ;hold onplot(ti,xi,'*r')
Best Answer