How to find the minimum Error when the position is known?

6 visualizzazioni (ultimi 30 giorni)
I know the position at which the value of Error is minimum. Is their a command to know the value of Error also?
clear all; close all; clc;
PHI=0:0.1:2*pi;
Error=[1.1995 1.2002 1.2007 1.2010 1.2011 1.2010 1.2007 1.2003 1.1996 1.1988 1.1978 1.1967 1.1954 1.1940 1.1924]
position=find(Error==min(Error))
phi0=PHI(position)

Risposta accettata

Willie Smit
Willie Smit il 8 Set 2021
PHI=0:0.1:2*pi;
Error=[1.1995 1.2002 1.2007 1.2010 1.2011 1.2010 1.2007 1.2003 1.1996 1.1988 1.1978 1.1967 1.1954 1.1940 1.1924];
[minValue, position] = min(Error); % minValue contains the minimum value in Error
phi0=PHI(position);

Più risposte (0)

Community Treasure Hunt

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

Start Hunting!

Translated by