MATLAB解多个变系数的非线性方程组。
13 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
cimele
el 23 de Nov. de 2022
Respondida: riyoli
el 23 de Nov. de 2022
好吧 我承认这个标题很难理解 娓娓道来之~
我有一组非线性方程组 就是解析几何的那种 目的是把一个面上的所有点计算出映射点
就是这个三元方程组,
py*(a-60)-b*(px-60)=0;
pz*b-c*py=0;
11.85/(a-60)+35/(px-60)-1=0;
px py pz分别是已知面上的点在x y z轴上的值, 由于是求面上所有点, 因此px py pz都是向量, 也就是已知的系数, a b c 是待求点的坐标 也就是未知量
初学MATLAB 查了各种资料也没找到符合我这种的 好苦闷~~貌似应该用fsolve函数 但是三个变系数不知道怎么用循环 而且循环太多了
真心求大神指导,救救我吧~
各种感谢!!!
0 comentarios
Respuesta aceptada
riyoli
el 23 de Nov. de 2022
A = rand(10,1);
B = rand(10,1);
f = @(a,b)@(x)[x(1).^a - b; x(2).^b - a];
n = numel(A);
op = optimset('display','off');
x = rand(2,n);
for i = 1:n
x(:,n) = fsolve(f(A(i),B(i)),rand(2,1),op);
end
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Matrix Indexing en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!