ERROR : Missing domain attribute 'min'
1 回表示 (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (2 件)
Walter Roberson
2019 年 10 月 25 日
symmin = @(x) feval(symengine, 'min',feval(symengine,'op',x))
0 件のコメント
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)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Assumptions についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!