Effacer les filtres
Effacer les filtres

How to interpolate a graph to find a point halfway from the max peak

1 vue (au cours des 30 derniers jours)
Graham Boag
Graham Boag le 24 Fév 2011
Hi, I am wondering how to find a point halfway from the maximum point (thats pointing down the way) on the graph I created:
http://www.2shared.com/photo/pIak1Za9/graph1.html
It was made using the code
I = imread('f_000021.tif','TIFF'); imshow('f_000021.tif') x=[128 180]; y=[50 50]; improfile(I,x,y) plot(max)
There isn't many pixels plotted so I was wondering if I could pick a point in between a couple of pixels on that graph (half of the maximum value)?
Thanks, Graham
  5 commentaires
Graham Boag
Graham Boag le 24 Fév 2011
Yes I think so, Sorry its not so easy for me to convey what I am trying to do - my mathematics language is not so good!
Jan
Jan le 24 Fév 2011
No problem. Finding a solution is often a iterative process, which clears the question at first. If the question is absolutely and mathematically clear, the solution is usually found already.

Connectez-vous pour commenter.

Réponse acceptée

Jan
Jan le 24 Fév 2011
Do you search for something like this?
V = sin(0:0.01:pi/2);
maxV = max(V);
minV = min(V);
Range = maxV - minV;
HalfIndex = find(V > maxV - Range / 2, 1, 'first');
You have to adjust the signs and > or < according to your exact problem.
  1 commentaire
Graham Boag
Graham Boag le 24 Fév 2011
Thanks, I will have a play around and see what I get!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur 2-D and 3-D Plots dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by