Loop in solve system of nonlinear equations
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have a problem with loop "for" in Solve system of nonlinear equations. I can solve nonlinear equations like this:
R=68.4043297;
V = [teta1; teta2];
F = @(V) [R-(37.5*sqrt(3))+(75*cos(V(1)))-(75*cos(V(2))); 97.5+37.5+(75*sin(V(1))) - (54.4818+75*sin(V(2)))];
XYA= fsolve(F, InitialGuess, Options);
but I have to change parametr R.
R=45:0.1:95
How do it?
0 Kommentare
Antworten (1)
Wiley Mosley
am 17 Okt. 2019
By calling the index of R in the for loop you should be able to save the XYA in an array so that you have the solutions for all values of R.
R=45:0.1:95;
for ii = 1:numel(R);
V = [teta1; teta2];
F = @(V) [R(ii)-(37.5*sqrt(3))+(75*cos(V(1)))-(75*cos(V(2))); 97.5+37.5+(75*sin(V(1))) - (54.4818+75*sin(V(2)))];
XYA(ii)= fsolve(F, InitialGuess, Options);
end
2 Kommentare
Siehe auch
Kategorien
Mehr zu Transfer Function Models finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!