How to measure graph wave distance ?

4 visualizzazioni (ultimi 30 giorni)
MARLIANA HAFIZA
MARLIANA HAFIZA il 23 Set 2024
Commentato: MARLIANA HAFIZA il 23 Set 2024
I want to find the distance between the graph and straight line as shown below,
Thank you.
  2 Commenti
Shashi Kiran
Shashi Kiran il 23 Set 2024
Do you have the specific points on the curve and the line available?
MARLIANA HAFIZA
MARLIANA HAFIZA il 23 Set 2024
I want to find the distance for all the points together. I have the points value for each line

Accedi per commentare.

Risposte (1)

Bruno Luong
Bruno Luong il 23 Set 2024
Modificato: Bruno Luong il 23 Set 2024
It looks like you need to rotate the whole picture (red line + blue curve) to minus the slope of the red line.
After rotation the redline become horizontal; then tthe distance is just the differential y-coordinate (after rotation) of the any blue points to the y-coordinate of the horizontal red line
Rotation is multiply x-y coordinates by matrix, see wiki
R := [cos(theta) -sin(theta);
sin(theta) cos(theta)]
R*[x;y]
Use theta as minus the slope of red line. You must know the redlinne equaltion, so its slope somehow.

Categorie

Scopri di più su Graphics in Help Center e File Exchange

Tag

Prodotti


Release

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by