ERROR : Missing domain attribute 'min'

조회 수: 1 (최근 30일)
Emiliano Rosso
Emiliano Rosso 2018년 11월 28일
답변: Steven Lord 2019년 10월 25일
when I use :
symmin=@(x,y)feval(symengine,'min',x,y);
symmin(3,4)
ans=
3
but if I want to find the minimum of a vector :
symmin=@(x)feval(symengine,'min',x); % or
symmin=@(x)feval(symengine,'min',x(1:10));
a=1:10;
symmin(a)
error using mupadengine/feval (line 187)
Missing domain attribute 'min'.
Can you explain me why ?
  댓글 수: 1
David André Gomez Romero
David André Gomez Romero 2019년 10월 25일
Did you find a solution ? I have the same problem...

댓글을 달려면 로그인하십시오.

답변 (2개)

Walter Roberson
Walter Roberson 2019년 10월 25일
symmin = @(x) feval(symengine, 'min',feval(symengine,'op',x))

Steven Lord
Steven Lord 2019년 10월 25일
Why are you trying to use feval on the symengine object to take the minimum of your symbolic input? Why not just call min directly on the symbolic object(s)?
two = sym(2);
three = sym(3);
z = min(two, three)
y = [two three two two three];
z2 = min(y)

카테고리

Help CenterFile Exchange에서 Number Theory에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by