fsolveの目的関数を配列で出力する場合の,要素ごとの計算方法を教えてください.
Ältere Kommentare anzeigen
関数fsolveを使用して,以下の非線形連立方程式を解きたいです.
G = [10 11 ; 12 13];
H = [-2 -1 ; -2 -3];
f = @(x)[x(1).*x(2)-5*x(2)+G(:,:), x(1).^3-x(2).^2+H(:,:)];
% 初期値
x0 = [I J];
I = [1 1 ; 1 1];
J = [1 1 ; 1 1];
x = fsolve(f,x0,options)
で,関数fの要素ごと(この例では2×2)で出力(x1,x2)を各要素で求めたいのですが,方法がわかりません.
分かる方いらっしゃいましたらご回答お願いいたします.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Matrix Indexing finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!