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

조회 수: 8 (최근 30일)
Haya Ali
Haya Ali 2021년 9월 8일
댓글: Haya Ali 2021년 9월 8일
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)

채택된 답변

Willie Smit
Willie Smit 2021년 9월 8일
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);

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Digital Filter Analysis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by